]> Cypherpunks repositories - gostls13.git/commitdiff
os: eradicate smallpox after test
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 6 May 2015 16:53:48 +0000 (09:53 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 6 May 2015 17:38:57 +0000 (17:38 +0000)
Otherwise:

$ go test  -short -cpu=1,1,2,2
--- FAIL: TestLookupEnv (0.00s)
        env_test.go:102: SMALLPOX="virus"
--- FAIL: TestLookupEnv-2 (0.00s)
        env_test.go:102: SMALLPOX="virus"
--- FAIL: TestLookupEnv-2 (0.00s)
        env_test.go:102: SMALLPOX="virus"

Change-Id: Ic1f6dd1bae3c79c4f7da02bc8c30b5e599627a82
Reviewed-on: https://go-review.googlesource.com/9794
Reviewed-by: Rob Pike <r@golang.org>
src/os/env_test.go

index 222489086980e7fe672db79a6502bce21e137187..d1074cdc60af11779957baa3616ec6e9d825c693 100644 (file)
@@ -101,6 +101,7 @@ func TestLookupEnv(t *testing.T) {
        if ok || value != "" {
                t.Fatalf("%s=%q", smallpox, value)
        }
+       defer Unsetenv(smallpox)
        err := Setenv(smallpox, "virus")
        if err != nil {
                t.Fatalf("failed to release smallpox virus")