Documentation ¶
Index ¶
- func RunCommands(t *testing.T, cmds []string, ignoreErrors bool) []string
- func SetupCrossNsDNAT(t *testing.T)
- func SetupDNAT(t *testing.T)
- func SetupDNAT6(t *testing.T)
- func SetupVethPair(t *testing.T)
- func TeardownCrossNsDNAT(t *testing.T)
- func TeardownDNAT(t *testing.T)
- func TeardownDNAT6(t *testing.T)
- func TeardownVethPair(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 SetupCrossNsDNAT ¶
SetupCrossNsDNAT sets up a network namespace, named "test", a veth pair, and a NAT rule in the "test" network namespace
func SetupDNAT ¶
SetupDNAT sets up a NAT translation from: * 2.2.2.2 to 1.1.1.1 (OUTPUT Chain) * 3.3.3.3 to 1.1.1.1 (PREROUTING Chain)
func SetupDNAT6 ¶
SetupDNAT6 sets up a NAT translation from fd00::2 to fd00::1
func SetupVethPair ¶
SetupVethPair sets up a network namespace, named "test", along with two IP addresses 2.2.2.3 and 2.2.2.4 to be used for namespace aware tests. 2.2.2.4 is within the "test" namespace, while 2.2.2.3 is a peer in the root namespace.
func TeardownCrossNsDNAT ¶
TeardownCrossNsDNAT cleans up the resources created by SetupCrossNsDNAT
func TeardownDNAT ¶
TeardownDNAT cleans up the resources created by SetupDNAT
func TeardownDNAT6 ¶
TeardownDNAT6 cleans up the resources created by SetupDNAT6
func TeardownVethPair ¶
TeardownVethPair cleans up the resources created by SetupVethPair
Types ¶
This section is empty.