Merge pull request #9765 from AkihiroSuda/remove-schema1

Disable the support for Schema 1 images
This commit is contained in:
Samuel Karp
2024-02-17 09:20:15 +00:00
committed by GitHub
7 changed files with 49 additions and 15 deletions

View File

@@ -40,6 +40,7 @@ import (
"github.com/containerd/containerd/v2/defaults"
imagelist "github.com/containerd/containerd/v2/integration/images"
"github.com/containerd/containerd/v2/internal/testutil"
"github.com/containerd/containerd/v2/pkg/deprecation"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/errdefs"
"github.com/containerd/log"
@@ -422,6 +423,7 @@ func TestImagePullSomePlatforms(t *testing.T) {
}
func TestImagePullSchema1(t *testing.T) {
t.Setenv(deprecation.EnvPullSchema1Image, "1")
client, err := newClient(t, address)
if err != nil {
t.Fatal(err)

View File

@@ -23,6 +23,7 @@ import (
. "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/integration/images"
"github.com/containerd/containerd/v2/pkg/deprecation"
"github.com/containerd/platforms"
)
@@ -46,6 +47,7 @@ var (
)
func TestImagePullSchema1WithEmptyLayers(t *testing.T) {
t.Setenv(deprecation.EnvPullSchema1Image, "1")
client, err := newClient(t, address)
if err != nil {
t.Fatal(err)