mirror of
https://github.com/golang/go
synced 2024-11-23 07:00:05 -07:00
net: make all.bat run for ordinary Windows users
This CL is required for all.bat to work out of the box on my Windows 8 laptop. These tests either require the firewall to be turned off or require the user to be in the Administrators group. I don't know which. Alex may follow up with a refinement of the test to allow them to run if the user is in the Administrators group. Fixes #6392. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/13421049
This commit is contained in:
parent
647eaed93b
commit
d9fdf88f34
@ -84,6 +84,9 @@ func TestConnICMPEcho(t *testing.T) {
|
||||
case "plan9":
|
||||
t.Skipf("skipping test on %q", runtime.GOOS)
|
||||
case "windows":
|
||||
if testing.Short() || !*testExternal {
|
||||
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
|
||||
}
|
||||
default:
|
||||
if os.Getuid() != 0 {
|
||||
t.Skip("skipping test; must be root")
|
||||
@ -158,6 +161,9 @@ func TestPacketConnICMPEcho(t *testing.T) {
|
||||
case "plan9":
|
||||
t.Skipf("skipping test on %q", runtime.GOOS)
|
||||
case "windows":
|
||||
if testing.Short() || !*testExternal {
|
||||
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
|
||||
}
|
||||
default:
|
||||
if os.Getuid() != 0 {
|
||||
t.Skip("skipping test; must be root")
|
||||
|
@ -25,6 +25,10 @@ var ipv4MulticastListenerTests = []struct {
|
||||
// port.
|
||||
func TestIPv4MulticastListener(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
if testing.Short() || !*testExternal {
|
||||
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
|
||||
}
|
||||
case "plan9":
|
||||
t.Skipf("skipping test on %q", runtime.GOOS)
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ func packetConnTestData(t *testing.T, net string, i int) ([]byte, func()) {
|
||||
t.Logf("skipping %q test on %q", net, runtime.GOOS)
|
||||
}
|
||||
case "windows":
|
||||
if testing.Short() || !*testExternal {
|
||||
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
|
||||
}
|
||||
default:
|
||||
if os.Getuid() != 0 {
|
||||
return nil, func() {
|
||||
|
@ -177,6 +177,9 @@ func TestIPConnSpecificMethods(t *testing.T) {
|
||||
case "plan9":
|
||||
t.Skipf("skipping test on %q", runtime.GOOS)
|
||||
case "windows":
|
||||
if testing.Short() || !*testExternal {
|
||||
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
|
||||
}
|
||||
default:
|
||||
if os.Getuid() != 0 {
|
||||
t.Skipf("skipping test; must be root")
|
||||
|
Loading…
Reference in New Issue
Block a user