Merge pull request #7210 from mxpv/image-list
Use image lists form integration/client tests
This commit is contained in:
@@ -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.Get(imagelist.Pause))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
"testing"
|
||||
|
||||
. "github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/integration/images"
|
||||
"github.com/containerd/containerd/platforms"
|
||||
)
|
||||
|
||||
@@ -33,8 +34,8 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
testImage = "ghcr.io/containerd/busybox:1.32"
|
||||
testMultiLayeredImage = "ghcr.io/containerd/volume-copy-up:2.1"
|
||||
testImage = images.Get(images.BusyBox)
|
||||
testMultiLayeredImage = images.Get(images.VolumeCopyUp)
|
||||
shortCommand = withProcessArgs("true")
|
||||
longCommand = withProcessArgs("/bin/sh", "-c", "while true; do sleep 1; done")
|
||||
)
|
||||
|
||||
@@ -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.Get(imagelist.Pause)
|
||||
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.Get(imagelist.Pause)
|
||||
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.Get(imagelist.Pause)
|
||||
|
||||
image, err := client.Pull(ctx, imageName, WithPullUnpack, WithPullSnapshotter(snapshotterName))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user