(t *testing.T)
| 29 | } |
| 30 | |
| 31 | func TestCreateAddr(t *testing.T) { |
| 32 | ipv4 := mustAddr(t, net.IP{127, 0, 0, 1}) |
| 33 | ipv6 := mustAddr(t, net.IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}) |
| 34 | port := 9000 |
| 35 | |
| 36 | require.Equal(t, &net.UDPAddr{IP: ipv4.AsSlice(), Port: port}, createAddr(NetworkTypeUDP4, ipv4, port)) |
| 37 | require.Equal(t, &net.UDPAddr{IP: ipv6.AsSlice(), Port: port}, createAddr(NetworkTypeUDP6, ipv6, port)) |
| 38 | require.Equal(t, &net.TCPAddr{IP: ipv4.AsSlice(), Port: port}, createAddr(NetworkTypeTCP4, ipv4, port)) |
| 39 | require.Equal(t, &net.TCPAddr{IP: ipv6.AsSlice(), Port: port}, createAddr(NetworkTypeTCP6, ipv6, port)) |
| 40 | } |
| 41 | |
| 42 | func problematicNetworkInterfaces(s string) (keep bool) { |
| 43 | defaultDockerBridgeNetwork := strings.Contains(s, "docker") |
nothing calls this directly
no test coverage detected
searching dependent graphs…