Skip to content

Commit

Permalink
conformance: remove check for zero layers in image manifest
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rchincha committed May 25, 2023
1 parent 58a1fe9 commit 3752917
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions conformance/02_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/<name>/manifests/<reference>",
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/<name>/manifests/<digest>", reggie.WithDigest(manifests[1].Digest)).
Expand Down

0 comments on commit 3752917

Please sign in to comment.