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 <milasb@gmail.com>
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
  • Loading branch information
glours and milas committed Jul 29, 2022
1 parent aa04417 commit aa0ca5e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cli/options_test.go
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 aa0ca5e

Please sign in to comment.