diff options
author | Russ Cox <rsc@golang.org> | 2019-06-05 12:33:30 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2019-06-06 00:11:40 +0000 |
commit | 4ed2e193bd1609a0f59ea2ec5343b4f106f92f95 (patch) | |
tree | e6e0baaca1a9983f3a5a834e7eff30e9eab0ce78 | |
parent | c00ff65d016c07f7feb188ca0458ae3bae0f1532 (diff) | |
download | go-4ed2e193bd1609a0f59ea2ec5343b4f106f92f95.tar.gz go-4ed2e193bd1609a0f59ea2ec5343b4f106f92f95.zip |
net: fix conf.teardown call in TestGoLookupIPOrderFallbackToFile
If the test fails, conf.teardown wouldn't be.
It doesn't look like it matters much, but clean up anyway.
Change-Id: I45c18095abfd49422975d061be20cbd971a98f8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/180780
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r-- | src/net/dnsclient_unix_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go index 1b67494e51e..98304d36eab 100644 --- a/src/net/dnsclient_unix_test.go +++ b/src/net/dnsclient_unix_test.go @@ -589,6 +589,8 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) { if err != nil { t.Fatal(err) } + defer conf.teardown() + if err := conf.writeAndUpdate([]string{}); err != nil { t.Fatal(err) } @@ -620,7 +622,6 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) { t.Errorf("%s: address doesn't match expectation. got %v, want %v", name, got, want) } } - defer conf.teardown() } // Issue 12712. |