From 37529175f6510263abfadbb5821c21de4ad9c9d0 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Thu, 25 May 2023 18:59:30 +0000 Subject: [PATCH] conformance: remove check for zero layers in image manifest As per image-spec, since this is a SHOULD (hence recommended) ... https://raw.githubusercontent.com/opencontainers/image-spec/main/manifest.md === layers array of objects Each item in the array MUST be a descriptor. For portability, layers SHOULD have at least one entry. === Signed-off-by: Ramkumar Chinchani --- conformance/02_push_test.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/conformance/02_push_test.go b/conformance/02_push_test.go index 5c4122a9..b457e2cc 100644 --- a/conformance/02_push_test.go +++ b/conformance/02_push_test.go @@ -348,20 +348,6 @@ var test02Push = func() { } }) - g.Specify("Registry should accept a manifest upload with no layers", func() { - SkipIfDisabled(push) - RunOnlyIfNot(skipEmptyLayerTest) - req := client.NewRequest(reggie.PUT, "/v2//manifests/", - reggie.WithReference(emptyLayerTestTag)). - SetHeader("Content-Type", "application/vnd.oci.image.manifest.v1+json"). - SetBody(emptyLayerManifestContent) - resp, err := client.Do(req) - Expect(err).To(BeNil()) - location := resp.Header().Get("Location") - Expect(location).ToNot(BeEmpty()) - Expect(resp.StatusCode()).To(Equal(http.StatusCreated)) - }) - g.Specify("GET request to manifest URL (digest) should yield 200 response", func() { SkipIfDisabled(push) req := client.NewRequest(reggie.GET, "/v2//manifests/", reggie.WithDigest(manifests[1].Digest)).