diff options
author | Russ Cox <rsc@golang.org> | 2009-11-10 17:39:01 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-10 17:39:01 -0800 |
commit | 4331058e5813886e9ba54e0f5a5cf0b2dba86ee4 (patch) | |
tree | 6e74242a0f22ce38b82bff5b3378cfcf197a57aa | |
parent | ac623a2f5cc99d733d26200901d97f60d4200ac9 (diff) | |
download | golang-4331058e5813886e9ba54e0f5a5cf0b2dba86ee4.tar.gz |
net: disable dns error test
some dns resolvers (opendns, for example)
are willing to make up results for any name.
R=agl, agl1
CC=golang-dev
http://codereview.appspot.com/152049
-rw-r--r-- | src/pkg/net/net_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pkg/net/net_test.go b/src/pkg/net/net_test.go index c06a05b3e..39fdf1e1d 100644 --- a/src/pkg/net/net_test.go +++ b/src/pkg/net/net_test.go @@ -5,10 +5,13 @@ package net import ( + "flag"; "regexp"; "testing"; ) +var runErrorTest = flag.Bool("run_error_test", false, "let TestDialError check for dns errors") + type DialErrorTest struct { Net string; Laddr string; @@ -52,6 +55,10 @@ var dialErrorTests = []DialErrorTest{ } func TestDialError(t *testing.T) { + if !*runErrorTest { + t.Logf("test disabled; use --run_error_test to enable"); + return; + } for i, tt := range dialErrorTests { c, e := Dial(tt.Net, tt.Laddr, tt.Raddr); if c != nil { |