diff options
| author | Mikio Hara <mikioh.mikioh@gmail.com> | 2015-06-14 07:50:17 +0900 |
|---|---|---|
| committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2015-06-16 17:37:29 +0000 |
| commit | 047f07a285edbc60f64018973be7ce6b341fe22d (patch) | |
| tree | 05b0937479bcbfaf1db3711c037fceb9a200f9c1 | |
| parent | 9585bb29c83a4a705e1f6135d9ca156a1b50ad89 (diff) | |
| download | go-047f07a285edbc60f64018973be7ce6b341fe22d.tar.xz | |
net: remove obsolete TestLookupHost
The motivation of TestLookupHost was to test codepaths on LookupHost,
LookupIP when we set CGO_ENABLED=1. Now we have serveral tests on those
APIs and their codepaths such as TestLookupGooglePublicDNSAddr,
TestCgoLookupIP, TestGoLookupIP, and the test using the ambiguous source
"localhost" is unnecessary.
Fixes #11182.
Change-Id: I397c823e1648114d91a229b316477bff2948b4f9
Reviewed-on: https://go-review.googlesource.com/11057
Reviewed-by: Ian Lance Taylor <iant@golang.org>
| -rw-r--r-- | src/net/hosts_test.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/net/hosts_test.go b/src/net/hosts_test.go index 4c6f203707..aca64c38b0 100644 --- a/src/net/hosts_test.go +++ b/src/net/hosts_test.go @@ -6,7 +6,6 @@ package net import ( "reflect" - "sort" "testing" ) @@ -119,17 +118,3 @@ func TestLookupStaticAddr(t *testing.T) { } } } - -func TestLookupHost(t *testing.T) { - // Can't depend on this to return anything in particular, - // but if it does return something, make sure it doesn't - // duplicate addresses (a common bug due to the way - // getaddrinfo works). - addrs, _ := LookupHost("localhost") - sort.Strings(addrs) - for i := 0; i+1 < len(addrs); i++ { - if addrs[i] == addrs[i+1] { - t.Fatalf("LookupHost(\"localhost\") = %v, has duplicate addresses", addrs) - } - } -} |
