labels: Add LabelDistributionSource
Add a public const for "containerd.io/distribution.source" in `labels` package and replace hardcoded usages. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
imagelist "github.com/containerd/containerd/integration/images"
|
||||
"github.com/containerd/containerd/labels"
|
||||
"github.com/containerd/containerd/platforms"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
@@ -105,7 +106,7 @@ func TestImagePullWithDistSourceLabel(t *testing.T) {
|
||||
defer client.ImageService().Delete(ctx, imageName)
|
||||
|
||||
cs := client.ContentStore()
|
||||
key := fmt.Sprintf("containerd.io/distribution.source.%s", source)
|
||||
key := labels.LabelDistributionSource + "." + source
|
||||
|
||||
// only check the target platform
|
||||
childrenHandler := images.LimitManifests(images.ChildrenHandler(cs), pMatcher, 1)
|
||||
|
Reference in New Issue
Block a user