From 6bcf463b019461454fb2164b725ad343b42bc386 Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Wed, 17 Apr 2019 09:40:46 -0400 Subject: [PATCH 1/2] Move to sha-specified test image for nanoserver Signed-off-by: Phil Estes --- client_windows_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_windows_test.go b/client_windows_test.go index 27189928e..f5a12137c 100644 --- a/client_windows_test.go +++ b/client_windows_test.go @@ -23,7 +23,7 @@ import ( const ( defaultAddress = `\\.\pipe\containerd-containerd-test` - testImage = "docker.io/microsoft/nanoserver:latest" + testImage = "docker.io/microsoft/nanoserver@sha256:8f78a4a7da4464973a5cd239732626141aec97e69ba3e4023357628630bc1ee2" ) var ( From a4942ca4fe45b75ad4873f33d2cec44ce2d6a3e3 Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Thu, 18 Apr 2019 20:07:54 +0800 Subject: [PATCH 2/2] Fix error on pull hang in CI Kill the underlying containerd after outputting error. Otherwise CI hangs indefinitely and requires the CI infrastructure to kill the build at the timeout expiration. Signed-off-by: Wei Fu Signed-off-by: Phil Estes --- client_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client_test.go b/client_test.go index b9f2febbb..75426da77 100644 --- a/client_test.go +++ b/client_test.go @@ -129,10 +129,11 @@ func TestMain(m *testing.M) { }).Info("running tests against containerd") // pull a seed image + log.G(ctx).Info("start to pull seed image") if _, err = client.Pull(ctx, testImage, WithPullUnpack); err != nil { - ctrd.Stop() - ctrd.Wait() fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String()) + ctrd.Kill() + ctrd.Wait() os.Exit(1) }