Skip to content

Commit

Permalink
relax the error expecations to accomodate different vault versions
Browse files Browse the repository at this point in the history
  • Loading branch information
phallstrom committed Dec 23, 2021
1 parent 427463d commit a002200
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions spec/integration/api/kv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,23 @@ module Vault
it "raises an error if the path does not exist" do
expect {
subject.update("test-update-non-existent", zig: "zag")
}.to raise_error(Vault::HTTPClientError, /404/)
}.to raise_error(Vault::HTTPClientError)
end

it "raises an error if the path has been deleted" do
expect {
subject.write("test-update-deleted", zip: "zap")
subject.delete("test-update-deleted")
subject.update("test-update-deleted", zig: "zag")
}.to raise_error(Vault::HTTPClientError, /404/)
}.to raise_error(Vault::HTTPClientError)
end

it "raises an error if the path has been destroyed" do
expect {
subject.write("test-update-destroyed", zip: "zap")
subject.delete("test-update-destroyed")
subject.update("test-update-destroyed", zig: "zag")
}.to raise_error(Vault::HTTPClientError, /404/)
}.to raise_error(Vault::HTTPClientError)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/integration/api/logical_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module Vault
subject.write("secret/test-update-v1", zip: "zap")
expect {
subject.update("secret/test-update-v1", bacon: true)
}.to raise_error(Vault::HTTPClientError, /405/)
}.to raise_error(Vault::HTTPClientError)
end
end

Expand Down

0 comments on commit a002200

Please sign in to comment.