Documentation ¶
Index ¶
- func PingTCP(t *testing.T, ip net.IP, port int) net.Conn
- func PingUDP(t *testing.T, ip net.IP, port int) net.Conn
- func RunCommands(t *testing.T, cmds []string, ignoreErrors bool) []string
- func StartServerTCP(t *testing.T, ip net.IP, port int) io.Closer
- func StartServerTCPNs(t *testing.T, ip net.IP, port int, ns string) io.Closer
- func StartServerUDP(t *testing.T, ip net.IP, port int) io.Closer
- func StartServerUDPNs(t *testing.T, ip net.IP, port int, ns string) io.Closer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PingTCP ¶
PingTCP connects to the provided IP address over TCP/TCPv6, sends the string "ping", reads from the connection, and returns the open connection for further use/inspection.
func PingUDP ¶
PingUDP connects to the provided IP address over UDP/UDPv6, sends the string "ping", and returns the open connection for further use/inspection.
func RunCommands ¶
RunCommands runs each command in cmds individually and returns the output as a []string, with each element corresponding to the respective command. If ignoreErrors is true, it will fail the test via t.Fatal immediately upon error. Otherwise, the output on errors will be logged via t.Log.
func StartServerTCP ¶
StartServerTCP starts a TCP server listening at provided IP address and port. It will respond to any connection with "hello" and then close the connection. It returns an io.Closer that should be Close'd when you are finished with it.
func StartServerTCPNs ¶
StartServerTCPNs is identical to StartServerTCP, but it operates with the network namespace provided by name.
func StartServerUDP ¶
StartServerUDP starts a UDP server listening at provided IP address and port. It does not respond in any fashion to sent datagrams. It returns an io.Closer that should be Close'd when you are finished with it.
Types ¶
This section is empty.