From d411e3a4cad8d16f81e76d83fd8a22da48d8791d Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Mon, 11 Sep 2023 10:19:37 +0200 Subject: [PATCH] chore(deps): bump github.com/hashicorp/vault-client-go in /modules/vault (#1566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): bump github.com/hashicorp/vault-client-go in /modules/vault Bumps [github.com/hashicorp/vault-client-go](https://github.com/hashicorp/vault-client-go) from 0.2.0 to 0.3.3. - [Release notes](https://github.com/hashicorp/vault-client-go/releases) - [Changelog](https://github.com/hashicorp/vault-client-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/vault-client-go/compare/v0.2.0...v0.3.3) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault-client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * up * Update vault_test.go * Update vault_test.go * Update vault_test.go * Update vault_test.go * Update vault_test.go --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Manuel de la Peña --- modules/vault/go.mod | 2 +- modules/vault/go.sum | 4 ++-- modules/vault/vault_test.go | 13 +++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/vault/go.mod b/modules/vault/go.mod index 3737d2dfa8..208e256146 100644 --- a/modules/vault/go.mod +++ b/modules/vault/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/docker/docker v24.0.6+incompatible - github.com/hashicorp/vault-client-go v0.2.0 + github.com/hashicorp/vault-client-go v0.3.3 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.23.0 github.com/tidwall/gjson v1.16.0 diff --git a/modules/vault/go.sum b/modules/vault/go.sum index 5ba8a9877c..13b5b73719 100644 --- a/modules/vault/go.sum +++ b/modules/vault/go.sum @@ -61,8 +61,8 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= -github.com/hashicorp/vault-client-go v0.2.0 h1:Zzf5D2kj7QmBZE2ZTdril1aJlujMptPatxslTkdDF+U= -github.com/hashicorp/vault-client-go v0.2.0/go.mod h1:C9rbJeHeI1Dy/MXXd5YLrzRfAH27n6mARnhpvaW/8gk= +github.com/hashicorp/vault-client-go v0.3.3 h1:osw2OiT8sPnHbwJCC7sZc/NSlgN4hm0Ka1M1yXsYuHw= +github.com/hashicorp/vault-client-go v0.3.3/go.mod h1:C9rbJeHeI1Dy/MXXd5YLrzRfAH27n6mARnhpvaW/8gk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= diff --git a/modules/vault/vault_test.go b/modules/vault/vault_test.go index cfa19ce6c9..558884c8ca 100644 --- a/modules/vault/vault_test.go +++ b/modules/vault/vault_test.go @@ -89,10 +89,10 @@ func TestVault(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"].(map[string]interface{})["foo1"]) + assert.Equal(t, "bar1", s.Data.Data["foo1"]) }) }) @@ -107,16 +107,17 @@ func TestVault(t *testing.T) { err = client.SetToken(token) assert.Nil(t, err) - _, err = client.Secrets.KVv2Write(ctx, "test3", schema.KVv2WriteRequest{ + _, err = client.Secrets.KvV2Write(ctx, "test3", schema.KvV2WriteRequest{ 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"].(map[string]interface{})["foo"]) + assert.Equal(t, "bar", s.Data.Data["foo"]) }) })