From f0bab506f173076b51f278987ccd0cd910fca96c Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Fri, 12 Aug 2016 11:39:58 -0700 Subject: [PATCH] Updated the busybox images --- client/driver/docker_test.go | 20 ++++++++++-------- .../test-resources/docker/busybox_glibc.tar | Bin 4404736 -> 4405760 bytes .../test-resources/docker/busybox_musl.tar | Bin 1418752 -> 1419776 bytes 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/client/driver/docker_test.go b/client/driver/docker_test.go index df1c26955..1bcc88fd3 100644 --- a/client/driver/docker_test.go +++ b/client/driver/docker_test.go @@ -95,7 +95,7 @@ func dockerSetup(t *testing.T, task *structs.Task) (*docker.Client, DriverHandle driverCtx, execCtx := testDriverContexts(task) driver := NewDockerDriver(driverCtx) - copyImage(execCtx, task, t) + copyImage(execCtx, task, "busybox.tar", t) handle, err := driver.Start(execCtx, task) if err != nil { @@ -158,7 +158,7 @@ func TestDockerDriver_StartOpen_Wait(t *testing.T) { driverCtx, execCtx := testDriverContexts(task) defer execCtx.AllocDir.Destroy() d := NewDockerDriver(driverCtx) - copyImage(execCtx, task, t) + copyImage(execCtx, task, "busybox.tar", t) handle, err := d.Start(execCtx, task) if err != nil { @@ -317,7 +317,7 @@ func TestDockerDriver_Start_Wait_AllocDir(t *testing.T) { driverCtx, execCtx := testDriverContexts(task) defer execCtx.AllocDir.Destroy() d := NewDockerDriver(driverCtx) - copyImage(execCtx, task, t) + copyImage(execCtx, task, "busybox.tar", t) handle, err := d.Start(execCtx, task) if err != nil { @@ -406,7 +406,7 @@ func TestDockerDriver_StartN(t *testing.T) { driverCtx, execCtx := testDriverContexts(task) defer execCtx.AllocDir.Destroy() d := NewDockerDriver(driverCtx) - copyImage(execCtx, task, t) + copyImage(execCtx, task, "busybox.tar", t) handles[idx], err = d.Start(execCtx, task) if err != nil { @@ -460,7 +460,9 @@ func TestDockerDriver_StartNVersions(t *testing.T) { driverCtx, execCtx := testDriverContexts(task) defer execCtx.AllocDir.Destroy() d := NewDockerDriver(driverCtx) - copyImage(execCtx, task, t) + copyImage(execCtx, task, "busybox.tar", t) + copyImage(execCtx, task, "busybox_musl.tar", t) + copyImage(execCtx, task, "busybox_glibc.tar", t) handles[idx], err = d.Start(execCtx, task) if err != nil { @@ -750,7 +752,7 @@ func TestDockerDriver_User(t *testing.T) { driverCtx, execCtx := testDriverContexts(task) driver := NewDockerDriver(driverCtx) defer execCtx.AllocDir.Destroy() - copyImage(execCtx, task, t) + copyImage(execCtx, task, "busybox.tar", t) // It should fail because the user "alice" does not exist on the given // image. @@ -860,8 +862,8 @@ func TestDockerDriver_Stats(t *testing.T) { } -func copyImage(execCtx *ExecContext, task *structs.Task, t *testing.T) { +func copyImage(execCtx *ExecContext, task *structs.Task, image string, t *testing.T) { taskDir, _ := execCtx.AllocDir.TaskDirs[task.Name] - dst := filepath.Join(taskDir, allocdir.TaskLocal, "busybox.tar") - copyFile("./test-resources/docker/busybox.tar", dst, t) + dst := filepath.Join(taskDir, allocdir.TaskLocal, image) + copyFile(filepath.Join("./test-resources/docker", image), dst, t) } diff --git a/client/driver/test-resources/docker/busybox_glibc.tar b/client/driver/test-resources/docker/busybox_glibc.tar index b6c168c929d13af805c4eebf0f8f289e747da609..6ae44673b5f5a346bad42ea0fc1c4879e33b097b 100644 GIT binary patch delta 323 zcmZ9_%Sr-a06<|UvzumSSz1{$e>W?$f1JEDW@$o;2wH~}Xi5lyp#_NuF3z$=6f`dq z*s=%d5o+hYf{3UCXZ^L`ZhP9@uTkj1PA?An=x2aIhH&Cy7&jw$7{$vNUMe(}cC{}OG^NULHOq_(pVWCm3)rFZC_wIwv zv&^LwXRUl$tyiw9wMyC2x@paNd37bNlIqd?hW_7)$No6J=8qxFrub$|ahI`+R?Eun MdyhJ5Fm&wr1gth?`v3p{ delta 201 zcmYMj$u0u{007XL8hdNsYU|i3YNl0VSLQz?632#Xf&i8Yn z^Z8e(phu)vpMC=d4H;HcGGf%2aT6v@nKonAoU(Zf7A;v;5nHip&AJVnwrtx`wQJA5 zngfYcUBjWKBbj3-PMtY-;nJ0sYd0UcTDhJzgXCY3q-mBmf;f4<`zqeQhT+d!lHW!T RPwjU1G09)TZd`4ZqF=JzKcN5s diff --git a/client/driver/test-resources/docker/busybox_musl.tar b/client/driver/test-resources/docker/busybox_musl.tar index 9bf943131e45b52b9a020f618354fb883e311a01..fb9a10c5e0459f47edf6c8ea882230e4fe81fdb1 100644 GIT binary patch delta 263 zcmZoT6V`Agtf7Umg{g(Pg{6hHg{_6Xg`1(Mpr}yteOHAZo+NQ7Ggo~X^AGMSO_|Fi|7aV&YIIXT<&7Klz_oL->KKY;+D IAjdBQ00!nO)Bpeg