From 03aafaa1cff235050f116bc228e63ea783f0b4ba Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Tue, 8 Jan 2019 17:44:08 -0800 Subject: [PATCH] Update the integration test. Signed-off-by: Lantao Liu --- client_unix_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client_unix_test.go b/client_unix_test.go index 9711d1c3a..fdd6b5335 100644 --- a/client_unix_test.go +++ b/client_unix_test.go @@ -20,6 +20,9 @@ package containerd import ( "runtime" + "testing" + + "github.com/containerd/containerd/platforms" ) const ( @@ -48,3 +51,20 @@ func init() { testImage = "docker.io/library/alpine:latest" } } + +func TestImagePullSchema1WithEmptyLayers(t *testing.T) { + client, err := newClient(t, address) + if err != nil { + t.Fatal(err) + } + defer client.Close() + + ctx, cancel := testContext(t) + defer cancel() + + schema1TestImageWithEmptyLayers := "gcr.io/google-containers/busybox@sha256:d8d3bc2c183ed2f9f10e7258f84971202325ee6011ba137112e01e30f206de67" + _, err = client.Pull(ctx, schema1TestImageWithEmptyLayers, WithPlatform(platforms.DefaultString()), WithSchema1Conversion, WithPullUnpack) + if err != nil { + t.Fatal(err) + } +}