From 352db26d5fd896b681046b1119f07e0ce1ed45b8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 17 Jul 2018 10:45:33 +0200 Subject: [PATCH] Fix flaky TestExternalGraphDriver/pull test This test occassionally fails on s390x and Power; 03:16:04 --- FAIL: TestExternalGraphDriver/pull (1.08s) 03:16:04 external_test.go:402: assertion failed: error is not nil: Error: No such image: busybox:latest Most likely these failures are caused due to Docker Hub updating the busybox:latest image, but not all architectures yet being available. Instead of using `:latest`, pull an image by digest, so that the test doesn't depend on Docker Hub having all architectures available for `:latest`. I selected the same digest as is currently used as "frozen image" in the Dockerfile. Signed-off-by: Sebastiaan van Stijn --- integration/plugin/graphdriver/external_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go index 2aabc21df3..99ce60ceef 100644 --- a/integration/plugin/graphdriver/external_test.go +++ b/integration/plugin/graphdriver/external_test.go @@ -394,12 +394,12 @@ func testGraphDriverPull(c client.APIClient, d *daemon.Daemon) func(*testing.T) defer d.Stop(t) ctx := context.Background() - r, err := c.ImagePull(ctx, "busybox:latest", types.ImagePullOptions{}) + r, err := c.ImagePull(ctx, "busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0", types.ImagePullOptions{}) assert.NilError(t, err) _, err = io.Copy(ioutil.Discard, r) assert.NilError(t, err) - container.Run(t, ctx, c, container.WithImage("busybox:latest")) + container.Run(t, ctx, c, container.WithImage("busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0")) } }