From a002200681a2fb3165ca6f9bfb552d5d6b80e893 Mon Sep 17 00:00:00 2001 From: Philip Hallstrom Date: Thu, 23 Dec 2021 14:32:04 -0800 Subject: [PATCH] relax the error expecations to accomodate different vault versions --- spec/integration/api/kv_spec.rb | 6 +++--- spec/integration/api/logical_spec.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/integration/api/kv_spec.rb b/spec/integration/api/kv_spec.rb index 60a5617e..1041676a 100644 --- a/spec/integration/api/kv_spec.rb +++ b/spec/integration/api/kv_spec.rb @@ -130,7 +130,7 @@ 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 @@ -138,7 +138,7 @@ module Vault 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 @@ -146,7 +146,7 @@ module Vault 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 diff --git a/spec/integration/api/logical_spec.rb b/spec/integration/api/logical_spec.rb index d57a707b..4cc6b97f 100644 --- a/spec/integration/api/logical_spec.rb +++ b/spec/integration/api/logical_spec.rb @@ -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