Skip to content

Commit

Permalink
fix for redis 5.0 not handling hash to string implicitly anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Mayer committed Oct 1, 2022
1 parent e133110 commit 9d8c4f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/coverband/collectors/route_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def report_routes_tracked
@one_time_timestamp = true
reported_time = Time.now.to_i
@routes_to_record.to_a.each do |route|
redis_store.hset(tracker_key, route, reported_time)
redis_store.hset(tracker_key, route.to_s, reported_time)
end
@routes_to_record.clear
rescue => e
Expand Down
4 changes: 2 additions & 2 deletions test/coverband/collectors/route_tracker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setup
test "track redirect routes" do
store = fake_store
route_hash = {controller: nil, action: nil, url_path: "path", verb: "GET"}
store.raw_store.expects(:hset).with(tracker_key, route_hash, anything)
store.raw_store.expects(:hset).with(tracker_key, route_hash.to_s, anything)
tracker = Coverband::Collectors::RouteTracker.new(store: store, roots: "dir")
payload = {
request: OpenStruct.new(
Expand All @@ -42,7 +42,7 @@ def setup
test "track controller routes" do
store = fake_store
route_hash = {controller: "SomeController", action: "index", url_path: "path", verb: "GET"}
store.raw_store.expects(:hset).with(tracker_key, route_hash, anything)
store.raw_store.expects(:hset).with(tracker_key, route_hash.to_s, anything)
tracker = Coverband::Collectors::RouteTracker.new(store: store, roots: "dir")
payload = {
controller: "SomeController",
Expand Down

0 comments on commit 9d8c4f0

Please sign in to comment.