Skip to content

Commit

Permalink
Fix hmac_paths spec to handle race condition
Browse files Browse the repository at this point in the history
The HMAC changes if the race is lost, so the spec needs to handle
both full paths.
  • Loading branch information
jeremyevans committed Jun 4, 2024
1 parent e0c9297 commit a0f10b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/plugin/hmac_paths_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def hmac_paths_app(&block)
end
end
body('/3').must_equal "/78a56ddf0e081ca127ab1bc704c8a4d5e7e62ccf327dec5c3189a5c72057334c/t/3/1"
body('/3/s').must_match %r"/9ffb7ce6b6ae76664aeebc53955c7c1d8d09e6908a512a6b5f22e7a24fffdc15/t/410244479[78]/1"
body('/3/s').must_match %r"(/9ffb7ce6b6ae76664aeebc53955c7c1d8d09e6908a512a6b5f22e7a24fffdc15/t/4102444797/1|/534c367b6c6154fb84e8a6ce6118a560b261306a7c35cb210e1cee98dd5d431a/t/4102444798/1)"
body('/4').must_equal "/f04e6d0571e2f3322bfa03b4b251070b7cdbde1004726fd69ded8cb40d1fb4ae/t/4/1"
body('/4/s').must_match %r"/ecc641d021a3cccd6f3931e41f75f3bbdc9b05791b0ac939278b306e40571c86/t/410244479[67]/1"
body('/4/s').must_match %r"(/ecc641d021a3cccd6f3931e41f75f3bbdc9b05791b0ac939278b306e40571c86/t/4102444796/1|/9ffb7ce6b6ae76664aeebc53955c7c1d8d09e6908a512a6b5f22e7a24fffdc15/t/4102444797/1)"
end

it "hmac_path gives priority to :until option over seconds option" do
Expand Down

0 comments on commit a0f10b4

Please sign in to comment.