Преглед изворни кода

Skip TestPacketManipulatorIPv6 when unsupported

Rod Hynes пре 5 година
родитељ
комит
82c80d9f64
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 3 0
      psiphon/common/packetman/packetman_linux_test.go
  2. 1 1
      psiphon/common/tun/tun_test.go

+ 3 - 0
psiphon/common/packetman/packetman_linux_test.go

@@ -57,6 +57,9 @@ func testPacketManipulator(useIPv6 bool, t *testing.T) {
 	network := "tcp4"
 	address := net.JoinHostPort(ipv4.String(), "0")
 	if useIPv6 {
+		if ipv6 == nil {
+			t.Skipf("test unsupported: no IP address")
+		}
 		network = "tcp6"
 		address = net.JoinHostPort(ipv6.String(), "0")
 	}

+ 1 - 1
psiphon/common/tun/tun_test.go

@@ -95,7 +95,7 @@ func testTunneledTCP(t *testing.T, useIPv6 bool) {
 	// and routing config, see the changes made in fixBindToDevice.
 
 	if TCP_RELAY_TOTAL_SIZE%TCP_RELAY_CHUNK_SIZE != 0 {
-		t.Fatalf("startTestTCPServer failed: invalid relay size")
+		t.Fatalf("invalid relay size")
 	}
 
 	MTU := DEFAULT_MTU