aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-10 17:39:01 -0800
committerRuss Cox <rsc@golang.org>2009-11-10 17:39:01 -0800
commit9dba695692c68b16555f113329606a56ff99b829 (patch)
tree63c3a827bfc44045ec25a8cfcc85cd97c79b9a69
parent484f46daea9a44afd9fc0ea90b2172dfa524d9bb (diff)
downloadgo-9dba695692c68b16555f113329606a56ff99b829.tar.gz
go-9dba695692c68b16555f113329606a56ff99b829.zip
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 https://golang.org/cl/152049
-rw-r--r--src/pkg/net/net_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pkg/net/net_test.go b/src/pkg/net/net_test.go
index c06a05b3ef..39fdf1e1d2 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 {