mirror of
https://github.com/golang/go
synced 2024-11-22 07:34:40 -07:00
build: remove DISABLE_NET_TESTS
Don't use external network during all.bash. R=r, r2, rh, ality CC=golang-dev https://golang.org/cl/4429041
This commit is contained in:
parent
57d0c26c01
commit
4c9634fc5b
@ -202,11 +202,6 @@ NOTEST+=\
|
|||||||
NOBENCH+=\
|
NOBENCH+=\
|
||||||
container/vector\
|
container/vector\
|
||||||
|
|
||||||
# Disable tests that depend on an external network.
|
|
||||||
ifeq ($(DISABLE_NET_TESTS),1)
|
|
||||||
NOTEST+=net syslog
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Disable tests that windows cannot run yet.
|
# Disable tests that windows cannot run yet.
|
||||||
ifeq ($(GOOS),windows)
|
ifeq ($(GOOS),windows)
|
||||||
NOTEST+=os/signal # no signals
|
NOTEST+=os/signal # no signals
|
||||||
|
@ -56,6 +56,11 @@ var googleaddrs = []string{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestLookupCNAME(t *testing.T) {
|
func TestLookupCNAME(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
// Don't use external network.
|
||||||
|
t.Logf("skipping external network test during -short")
|
||||||
|
return
|
||||||
|
}
|
||||||
cname, err := LookupCNAME("www.google.com")
|
cname, err := LookupCNAME("www.google.com")
|
||||||
if cname != "www.l.google.com." || err != nil {
|
if cname != "www.l.google.com." || err != nil {
|
||||||
t.Errorf(`LookupCNAME("www.google.com.") = %q, %v, want "www.l.google.com.", nil`, cname, err)
|
t.Errorf(`LookupCNAME("www.google.com.") = %q, %v, want "www.l.google.com.", nil`, cname, err)
|
||||||
@ -63,6 +68,11 @@ func TestLookupCNAME(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDialGoogle(t *testing.T) {
|
func TestDialGoogle(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
// Don't use external network.
|
||||||
|
t.Logf("skipping external network test during -short")
|
||||||
|
return
|
||||||
|
}
|
||||||
// If no ipv6 tunnel, don't try the last address.
|
// If no ipv6 tunnel, don't try the last address.
|
||||||
if !*ipv6 {
|
if !*ipv6 {
|
||||||
googleaddrs[len(googleaddrs)-1] = ""
|
googleaddrs[len(googleaddrs)-1] = ""
|
||||||
|
@ -52,6 +52,10 @@ func TestNewLogger(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDial(t *testing.T) {
|
func TestDial(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
// Depends on syslog daemon running, and sometimes it's not.
|
||||||
|
t.Logf("skipping syslog test during -short")
|
||||||
|
}
|
||||||
l, err := Dial("", "", LOG_ERR, "syslog_test")
|
l, err := Dial("", "", LOG_ERR, "syslog_test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Dial() failed: %s", err)
|
t.Fatalf("Dial() failed: %s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user