Skip to content

Commit

Permalink
Update vault_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed Sep 10, 2023
1 parent 2098f59 commit eb95f95
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestVaultGetSecretPathWithClient(t *testing.T) {
err = client.SetToken(token)
assert.Nil(t, err)

s, err := client.Secrets.KvV2Read(ctx, "test1")
s, err := client.Secrets.KvV2Read(ctx, "test1", vaultClient.WithMountPath("secret"))
assert.Nil(t, err)
assert.Equal(t, "bar1", s.Data.Data["foo1"])
}
Expand All @@ -120,10 +120,11 @@ func TestVaultWriteSecretWithClient(t *testing.T) {
Data: map[string]any{
"foo": "bar",
},
})
},
vaultClient.WithMountPath("secret"))
assert.Nil(t, err)

s, err := client.Secrets.KvV2Read(ctx, "test3")
s, err := client.Secrets.KvV2Read(ctx, "test3", vaultClient.WithMountPath("secret"))
assert.Nil(t, err)
assert.Equal(t, "bar", s.Data.Data["foo"])
}

0 comments on commit eb95f95

Please sign in to comment.