From cfdd418fe23880cad88639596c1171cbe7ad6ffb Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Fri, 28 Sep 2018 17:47:22 -0700 Subject: Made a few changes to make testutil.Docker easier to use PiperOrigin-RevId: 215023376 Change-Id: I139569bd15c013e5dd0f60d0c98a64eaa0ba9e8e --- runsc/test/integration/exec_test.go | 2 +- runsc/test/integration/integration_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'runsc/test/integration') diff --git a/runsc/test/integration/exec_test.go b/runsc/test/integration/exec_test.go index 6053ecd1c..910c36597 100644 --- a/runsc/test/integration/exec_test.go +++ b/runsc/test/integration/exec_test.go @@ -40,7 +40,7 @@ func TestExecCapabilities(t *testing.T) { d := testutil.MakeDocker("exec-test") // Start the container. - if _, err := d.Run("alpine", "sh", "-c", "cat /proc/self/status; sleep 100"); err != nil { + if err := d.Run("alpine", "sh", "-c", "cat /proc/self/status; sleep 100"); err != nil { t.Fatalf("docker run failed: %v", err) } defer d.CleanUp() diff --git a/runsc/test/integration/integration_test.go b/runsc/test/integration/integration_test.go index 59df5bd7c..457b5fbf5 100644 --- a/runsc/test/integration/integration_test.go +++ b/runsc/test/integration/integration_test.go @@ -98,8 +98,8 @@ func TestPauseResume(t *testing.T) { t.Fatal("docker pull failed:", err) } d := testutil.MakeDocker("pause-resume-test") - if out, err := d.Run("-p", "8080", "google/python-hello"); err != nil { - t.Fatalf("docker run failed: %v\nout: %s", err, out) + if err := d.Run("-p", "8080", "google/python-hello"); err != nil { + t.Fatalf("docker run failed: %v", err) } defer d.CleanUp() @@ -157,7 +157,7 @@ func TestConnectToSelf(t *testing.T) { // Creates server that replies "server" and exists. Sleeps at the end because // 'docker exec' gets killed if the init process exists before it can finish. - if _, err := d.Run("ubuntu:trusty", "/bin/sh", "-c", "echo server | nc -l -p 8080 && sleep 1"); err != nil { + if err := d.Run("ubuntu:trusty", "/bin/sh", "-c", "echo server | nc -l -p 8080 && sleep 1"); err != nil { t.Fatal("docker run failed:", err) } defer d.CleanUp() -- cgit v1.2.3