diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-08-02 12:40:29 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-02 12:42:07 -0700 |
commit | 4c1167de4ee2aa7b71729ff8b1c742b4183168d1 (patch) | |
tree | 13cedfb93a66e617fafd0cc1f6feaac764fb764b /runsc/test/image/image_test.go | |
parent | 57d0fcbdbf7e9d2d573ce8d4ca2f72b82f778d63 (diff) |
Isolate image pulling time from container startup
mysql image test is timing out sporadically and it's hard to tell
where the slow down in coming from.
PiperOrigin-RevId: 207147237
Change-Id: I05a4d2c116292695d63cf861f3b89cd1c54b6106
Diffstat (limited to 'runsc/test/image/image_test.go')
-rw-r--r-- | runsc/test/image/image_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runsc/test/image/image_test.go b/runsc/test/image/image_test.go index 04c334d92..248934484 100644 --- a/runsc/test/image/image_test.go +++ b/runsc/test/image/image_test.go @@ -82,6 +82,9 @@ func testHTTPServer(port int) error { } func TestHttpd(t *testing.T) { + if out, err := testutil.Pull("httpd"); err != nil { + t.Fatalf("docker pull failed: %v\nout: %s", err, out) + } d := testutil.MakeDocker("http-test") dir, err := testutil.PrepareFiles("latin10k.txt") @@ -112,6 +115,9 @@ func TestHttpd(t *testing.T) { } func TestNginx(t *testing.T) { + if out, err := testutil.Pull("nginx"); err != nil { + t.Fatalf("docker pull failed: %v\nout: %s", err, out) + } d := testutil.MakeDocker("net-test") dir, err := testutil.PrepareFiles("latin10k.txt") @@ -142,6 +148,9 @@ func TestNginx(t *testing.T) { } func TestMysql(t *testing.T) { + if out, err := testutil.Pull("mysql"); err != nil { + t.Fatalf("docker pull failed: %v\nout: %s", err, out) + } d := testutil.MakeDocker("mysql-test") // Start the container. |