Skip to content

Commit

Permalink
refactor: Update vault token to "MyToKeN" in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Keloran committed Jun 30, 2024
1 parent d06adae commit 87af4ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ func TestGetSecret(t *testing.T) {
ctx := context.Background()
vaultContainer, err := vault.RunContainer(ctx,
testcontainers.WithImage("hashicorp/vault:1.13.0"),
vault.WithToken("root-token"),
vault.WithToken("MyToKeN"),
vault.WithInitCommand("secrets enable transit", "write -f transit/keys/my-key"),
vault.WithInitCommand("kv put secret/test1 foo1=bar"))
vault.WithInitCommand("kv put kv/secret/test1 foo1=bar"))
assert.Nil(t, err)
defer func() {
err := vaultContainer.Terminate(ctx)
Expand All @@ -132,8 +132,8 @@ func TestGetSecret(t *testing.T) {
address, err := vaultContainer.HttpHostAddress(ctx)
assert.Nil(t, err)

v := NewVault(address, "root-token")
err = v.GetRemoteSecrets("kv/data/secret/test1")
v := NewVault(address, "MyToKeN")
err = v.GetRemoteSecrets("kv/secret/test1")
assert.Nil(t, err)

secret, err := v.GetSecret("foo1")
Expand Down

0 comments on commit 87af4ec

Please sign in to comment.