Use image lists instead of hardcoded images
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
552d763447
commit
2ae5f405d2
@ -30,6 +30,7 @@ import (
|
||||
"github.com/containerd/containerd/defaults"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
imagelist "github.com/containerd/containerd/integration/images"
|
||||
"github.com/containerd/containerd/leases"
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/containerd/containerd/log/logtest"
|
||||
@ -333,7 +334,7 @@ func TestImagePullAllPlatforms(t *testing.T) {
|
||||
defer cancel()
|
||||
|
||||
cs := client.ContentStore()
|
||||
img, err := client.Fetch(ctx, "k8s.gcr.io/pause:3.7")
|
||||
img, err := client.Fetch(ctx, imagelist.PauseImage)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -26,12 +26,13 @@ import (
|
||||
. "github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
imagelist "github.com/containerd/containerd/integration/images"
|
||||
"github.com/containerd/containerd/platforms"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
func TestImageIsUnpacked(t *testing.T) {
|
||||
const imageName = "k8s.gcr.io/pause:3.7"
|
||||
imageName := imagelist.PauseImage
|
||||
ctx, cancel := testContext(t)
|
||||
defer cancel()
|
||||
|
||||
@ -137,7 +138,7 @@ func TestImageUsage(t *testing.T) {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
imageName := "k8s.gcr.io/pause:3.7"
|
||||
imageName := imagelist.PauseImage
|
||||
ctx, cancel := testContext(t)
|
||||
defer cancel()
|
||||
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
. "github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
imagelist "github.com/containerd/containerd/integration/images"
|
||||
"github.com/containerd/containerd/leases"
|
||||
"github.com/opencontainers/image-spec/identity"
|
||||
)
|
||||
@ -55,7 +56,7 @@ func TestLeaseResources(t *testing.T) {
|
||||
defer ls.Delete(ctx, l, leases.SynchronousDelete)
|
||||
|
||||
// step 1: download image
|
||||
imageName := "k8s.gcr.io/pause:3.7"
|
||||
imageName := imagelist.PauseImage
|
||||
|
||||
image, err := client.Pull(ctx, imageName, WithPullUnpack, WithPullSnapshotter(snapshotterName))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user