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 <derek@mcgstyle.net>
This commit is contained in:
parent
efb04a3361
commit
438b3cb694
@ -201,7 +201,7 @@ func TestImagePullAllPlatforms(t *testing.T) {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
cs := client.ContentStore()
|
cs := client.ContentStore()
|
||||||
img, err := client.Fetch(ctx, testImage)
|
img, err := client.Fetch(ctx, "docker.io/library/busybox:latest")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ func TestImagePullSomePlatforms(t *testing.T) {
|
|||||||
opts = append(opts, WithPlatform(platform))
|
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 {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ func TestImageIsUnpacked(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// By default pull does not unpack an image
|
// 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 {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user