integration/libnetwork: make delInterface() a t.Helper()
Otherwise errors within this function will all show to be at the line number of the utility, instead of where it failed in the test: === RUN TestDaemonDefaultNetworkPools service_test.go:23: assertion failed: Command: ip link delete docker0 ExitCode: 127 Error: exec: "ip": executable file not found in $PATH Stdout: Stderr: Failures: ExitCode was 127 expected 0 Expected no error === RUN TestDaemonRestartWithExistingNetwork service_test.go:23: assertion failed: Command: ip link delete docker0 ExitCode: 127 Error: exec: "ip": executable file not found in $PATH Stdout: Stderr: Failures: ExitCode was 127 expected 0 Expected no error Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3ab8decad7
commit
7e67bc067f
1 changed files with 1 additions and 0 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
|
||||
// delInterface removes given network interface
|
||||
func delInterface(t *testing.T, ifName string) {
|
||||
t.Helper()
|
||||
icmd.RunCommand("ip", "link", "delete", ifName).Assert(t, icmd.Success)
|
||||
icmd.RunCommand("iptables", "-t", "nat", "--flush").Assert(t, icmd.Success)
|
||||
icmd.RunCommand("iptables", "--flush").Assert(t, icmd.Success)
|
||||
|
|
Loading…
Reference in a new issue