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