From 1a9cb9f7aff2fe30316fe25e9edf563aa6727c07 Mon Sep 17 00:00:00 2001 From: Philip Hallstrom Date: Thu, 23 Dec 2021 15:49:37 -0800 Subject: [PATCH] update spec to match on custom_metadata for vault >= 1.9.0 --- spec/integration/api/kv_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/integration/api/kv_spec.rb b/spec/integration/api/kv_spec.rb index d5fe5f40..516cb0fb 100644 --- a/spec/integration/api/kv_spec.rb +++ b/spec/integration/api/kv_spec.rb @@ -60,7 +60,11 @@ module Vault subject.write("b:@c%n-read", foo: "bar") secret = subject.read("b:@c%n-read") expect(secret).to be - expect(secret.metadata.keys).to match_array([:created_time, :deletion_time, :version, :destroyed]) + if vault_meets_requirements?(">= 1.9.0") + expect(secret.metadata.keys).to match_array([:created_time, :deletion_time, :version, :destroyed, :custom_metadata]) + else + expect(secret.metadata.keys).to match_array([:created_time, :deletion_time, :version, :destroyed]) + end end end