Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
  • Loading branch information
amartinezfayo committed Jun 22, 2020
1 parent 5ee2de6 commit 2665ecb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/server/plugin/upstreamauthority/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (vps *VaultPluginSuite) Test_Configure() {
name: "Configure plugin with AppRole authentication params given as environment variables",
configTmpl: testAppRoleAuthConfigWithEnvTpl,
envKeyVal: map[string]string{
"VAULT_APPROLE_ID": "test-approle-idd",
"VAULT_APPROLE_ID": "test-approle-id",
"VAULT_APPROLE_SECRET_ID": "test-approle-secret-id",
},
},
Expand All @@ -101,9 +101,13 @@ func (vps *VaultPluginSuite) Test_Configure() {
} {
c := c
vps.Run(c.name, func() {
defer func() {
for k := range c.envKeyVal {
os.Unsetenv(k)
}
}()
for k, v := range c.envKeyVal {
os.Setenv(k, v)
defer os.Unsetenv(k)
}

p := vps.newPlugin()
Expand Down

0 comments on commit 2665ecb

Please sign in to comment.