Skip to content

Commit aa0ca5e

Browse files
gloursmilas
andcommitted
use t.Setenv instead of os.SetEnv + defer os.Unsetenv
Co-authored-by: Milas Bowman <[email protected]> Signed-off-by: Guillaume Lours <[email protected]>
1 parent aa04417 commit aa0ca5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cli/options_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ func TestWithSeparator(t *testing.T) {
251251
})
252252

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

0 commit comments

Comments
 (0)