From 438b3cb694ea8360540192b990f2eb4f520f4c12 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 1 Aug 2018 11:17:40 -0700 Subject: [PATCH] Update multi-arch image tests Ensure the test pull for all platforms uses a multi-arch image Use the pause container for testing specific platforms Update the image unpack test to be explicit about the platform to unpack Signed-off-by: Derek McGowan --- client_test.go | 4 ++-- image_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client_test.go b/client_test.go index c801abb43..a654a5122 100644 --- a/client_test.go +++ b/client_test.go @@ -201,7 +201,7 @@ func TestImagePullAllPlatforms(t *testing.T) { defer cancel() cs := client.ContentStore() - img, err := client.Fetch(ctx, testImage) + img, err := client.Fetch(ctx, "docker.io/library/busybox:latest") if err != nil { t.Fatal(err) } @@ -249,7 +249,7 @@ func TestImagePullSomePlatforms(t *testing.T) { opts = append(opts, WithPlatform(platform)) } - img, err := client.Fetch(ctx, "docker.io/library/busybox:latest", opts...) + img, err := client.Fetch(ctx, "k8s.gcr.io/pause:3.1", opts...) if err != nil { t.Fatal(err) } diff --git a/image_test.go b/image_test.go index eece57af7..d95f5105b 100644 --- a/image_test.go +++ b/image_test.go @@ -45,7 +45,7 @@ func TestImageIsUnpacked(t *testing.T) { } // By default pull does not unpack an image - image, err := client.Pull(ctx, imageName) + image, err := client.Pull(ctx, imageName, WithPlatform("linux/amd64")) if err != nil { t.Fatal(err) }