From 581e8e891886e6db387ed27aabda7dd8f1d14174 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 23 May 2014 11:31:01 -0700 Subject: [PATCH] Update integration tests with --net flag Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- integration-cli/docker_cli_run_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 10b9f6a7c7..3be5cbd93d 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -251,13 +251,13 @@ func TestDockerRunWorkingDirectory(t *testing.T) { // pinging Google's DNS resolver should fail when we disable the networking func TestDockerRunWithoutNetworking(t *testing.T) { - runCmd := exec.Command(dockerBinary, "run", "--networking=false", "busybox", "ping", "-c", "1", "8.8.8.8") + runCmd := exec.Command(dockerBinary, "run", "--net=none", "busybox", "ping", "-c", "1", "8.8.8.8") out, _, exitCode, err := runCommandWithStdoutStderr(runCmd) if err != nil && exitCode != 1 { t.Fatal(out, err) } if exitCode != 1 { - t.Errorf("--networking=false should've disabled the network; the container shouldn't have been able to ping 8.8.8.8") + t.Errorf("--net=none should've disabled the network; the container shouldn't have been able to ping 8.8.8.8") } runCmd = exec.Command(dockerBinary, "run", "-n=false", "busybox", "ping", "-c", "1", "8.8.8.8") @@ -271,7 +271,7 @@ func TestDockerRunWithoutNetworking(t *testing.T) { deleteAllContainers() - logDone("run - disable networking with --networking=false") + logDone("run - disable networking with --net=none") logDone("run - disable networking with -n=false") } @@ -678,7 +678,7 @@ func TestContainerNetwork(t *testing.T) { // Issue #4681 func TestLoopbackWhenNetworkDisabled(t *testing.T) { - cmd := exec.Command(dockerBinary, "run", "--networking=false", "busybox", "ping", "-c", "1", "127.0.0.1") + cmd := exec.Command(dockerBinary, "run", "--net=none", "busybox", "ping", "-c", "1", "127.0.0.1") if _, err := runCommand(cmd); err != nil { t.Fatal(err) } @@ -689,7 +689,7 @@ func TestLoopbackWhenNetworkDisabled(t *testing.T) { } func TestLoopbackOnlyExistsWhenNetworkingDisabled(t *testing.T) { - cmd := exec.Command(dockerBinary, "run", "--networking=false", "busybox", "ip", "a", "show", "up") + cmd := exec.Command(dockerBinary, "run", "--net=none", "busybox", "ip", "a", "show", "up") out, _, err := runCommandWithOutput(cmd) if err != nil { t.Fatal(err, out)