mirror of
https://github.com/golang/go
synced 2024-11-26 00:38:00 -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:
parent
484f46daea
commit
9dba695692
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user