Skip to content

Commit

Permalink
replace use of os.Unsetenv in test with t.Setenv and remove t.Paralle…
Browse files Browse the repository at this point in the history
…l from test that rely on env being modified.
  • Loading branch information
Marc Boudreau committed Mar 7, 2023
1 parent 4b9eb23 commit d806629
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions command/server/hcp_link_config_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package server

import (
"os"
"testing"

"github.com/go-test/deep"
Expand All @@ -10,9 +9,9 @@ import (
)

func TestHCPLinkConfig(t *testing.T) {
os.Unsetenv("HCP_CLIENT_ID")
os.Unsetenv("HCP_CLIENT_SECRET")
os.Unsetenv("HCP_RESOURCE_ID")
t.Setenv("HCP_CLIENT_ID", "")
t.Setenv("HCP_CLIENT_SECRET", "")
t.Setenv("HCP_RESOURCE_ID", "")

config, err := LoadConfigFile("./test-fixtures/hcp_link_config.hcl")
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion vault/external_tests/hcp_link/hcp_link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
)

func TestHCPLinkConnected(t *testing.T) {
t.Parallel()
cluster := getTestCluster(t, 2)
defer cluster.Cleanup()

Expand Down

0 comments on commit d806629

Please sign in to comment.