Skip to content

Commit

Permalink
use t.Setenv instead of os.SetEnv + defer os.Unsetenv
Browse files Browse the repository at this point in the history
Co-authored-by: Milas Bowman <[email protected]>
  • Loading branch information
glours and milas authored Jul 29, 2022
1 parent aa04417 commit 2f23f04
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cli/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ func TestWithSeparator(t *testing.T) {
})

t.Run("With compatibility separator", func(t *testing.T) {
os.Setenv("COMPOSE_COMPATIBILITY", "true") //nolint:errcheck
defer os.Unsetenv("COMPOSE_COMPATIBILITY") //nolint:errcheck
t.Setenv("COMPOSE_COMPATIBILITY", "true")
opts, err := NewProjectOptions([]string{
"testdata/simple/compose-with-network-and-volume.yaml",
}, WithName("my-project"), WithOsEnv)
Expand Down

0 comments on commit 2f23f04

Please sign in to comment.