]> Cypherpunks repositories - gostls13.git/commitdiff
net: change cname lookup test target to iana.org
authorMikio Hara <mikioh.mikioh@gmail.com>
Sun, 9 Sep 2012 14:53:48 +0000 (23:53 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sun, 9 Sep 2012 14:53:48 +0000 (23:53 +0900)
It might be meaningful, and stable than others.

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/6499091

src/pkg/net/dialgoogle_test.go
src/pkg/net/lookup_test.go

index 03c4499720f02cb88e5c9af2a6d145c4edf339d6..426e2ffb0017e33c4877f5139947949931a639ac 100644 (file)
@@ -41,17 +41,6 @@ func doDial(t *testing.T, network, addr string) {
        fd.Close()
 }
 
-func TestLookupCNAME(t *testing.T) {
-       if testing.Short() || !*testExternal {
-               t.Logf("skipping test to avoid external network")
-               return
-       }
-       cname, err := LookupCNAME("www.google.com")
-       if !strings.HasSuffix(cname, ".l.google.com.") || err != nil {
-               t.Errorf(`LookupCNAME("www.google.com.") = %q, %v, want "*.l.google.com.", nil`, cname, err)
-       }
-}
-
 var googleaddrsipv4 = []string{
        "%d.%d.%d.%d:80",
        "www.google.com:80",
index 3a61dfb29c2ce77759a8700bcbeaa7a26c3c7eeb..84f089e86970ffbc923e9f2a567906cdba567f4d 100644 (file)
@@ -9,6 +9,7 @@ package net
 
 import (
        "flag"
+       "strings"
        "testing"
 )
 
@@ -79,6 +80,17 @@ func TestGoogleDNSAddr(t *testing.T) {
        }
 }
 
+func TestLookupIANACNAME(t *testing.T) {
+       if testing.Short() || !*testExternal {
+               t.Logf("skipping test to avoid external network")
+               return
+       }
+       cname, err := LookupCNAME("www.iana.org")
+       if !strings.HasSuffix(cname, ".icann.org.") || err != nil {
+               t.Errorf(`LookupCNAME("www.iana.org.") = %q, %v, want "*.icann.org.", nil`, cname, err)
+       }
+}
+
 var revAddrTests = []struct {
        Addr      string
        Reverse   string