Skip to content

Commit

Permalink
fix setEnvs
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelPalenzuelaDD committed Jun 28, 2024
1 parent 229b502 commit 1987b7b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/civisibility/utils/ci_providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (
"testing"
)

func setEnvs(t *testing.T, env map[string]string) {
for key, value := range env {
t.Setenv(key, value)
}
}

func sortJSONKeys(jsonStr string) string {
tmp := map[string]string{}
_ = json.Unmarshal([]byte(jsonStr), &tmp)
Expand Down Expand Up @@ -84,8 +90,7 @@ func TestTags(t *testing.T) {
}

t.Run(name, func(t *testing.T) {
reset := setEnvs(env)
defer reset()
setEnvs(t, env)
providerTags := getProviderTags()

for expectedKey, expectedValue := range tags {
Expand Down

0 comments on commit 1987b7b

Please sign in to comment.