mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
backport of commit fdc257d3a0 (#22120)
Co-authored-by: Max Bowsher <maxbowsher@gmail.com>
This commit is contained in:
committed by
GitHub
parent
798d6e877d
commit
1fc169f28a
@@ -145,17 +145,17 @@ func TestKVHelpers(t *testing.T) {
|
||||
teardownTest, _ := setupKVv2Test(t)
|
||||
defer teardownTest(t)
|
||||
|
||||
_, err = client.KVv2(v1MountPath).Get(context.Background(), "does/not/exist")
|
||||
_, err = client.KVv2(v2MountPath).Get(context.Background(), "does/not/exist")
|
||||
if !errors.Is(err, api.ErrSecretNotFound) {
|
||||
t.Fatalf("KVv2.Get is expected to return an api.ErrSecretNotFound wrapped error for a missing secret; got %v", err)
|
||||
}
|
||||
|
||||
_, err = client.KVv2(v1MountPath).GetMetadata(context.Background(), "does/not/exist")
|
||||
_, err = client.KVv2(v2MountPath).GetMetadata(context.Background(), "does/not/exist")
|
||||
if !errors.Is(err, api.ErrSecretNotFound) {
|
||||
t.Fatalf("KVv2.GetMetadata is expected to return an api.ErrSecretNotFound wrapped error for a missing secret; got %v", err)
|
||||
}
|
||||
|
||||
_, err = client.KVv2(v1MountPath).GetVersion(context.Background(), secretPath, 99)
|
||||
_, err = client.KVv2(v2MountPath).GetVersion(context.Background(), secretPath, 99)
|
||||
if !errors.Is(err, api.ErrSecretNotFound) {
|
||||
t.Fatalf("KVv2.GetVersion is expected to return an api.ErrSecretNotFound wrapped error for a missing secret version; got %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user