Commit 4ed2e193 authored by Russ Cox's avatar Russ Cox

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c00ff65d
...@@ -589,6 +589,8 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) { ...@@ -589,6 +589,8 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer conf.teardown()
if err := conf.writeAndUpdate([]string{}); err != nil { if err := conf.writeAndUpdate([]string{}); err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -620,7 +622,6 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) { ...@@ -620,7 +622,6 @@ func TestGoLookupIPOrderFallbackToFile(t *testing.T) {
t.Errorf("%s: address doesn't match expectation. got %v, want %v", name, got, want) t.Errorf("%s: address doesn't match expectation. got %v, want %v", name, got, want)
} }
} }
defer conf.teardown()
} }
// Issue 12712. // Issue 12712.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment