1
0
mirror of https://github.com/golang/go synced 2024-11-26 00:17:58 -07:00

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
This commit is contained in:
Russ Cox 2009-11-10 17:39:01 -08:00
parent 484f46daea
commit 9dba695692

View File

@ -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 {