Skip to content

Commit

Permalink
Fix delete of empty layer manifest (opencontainers#428)
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Mitchell <git@bmitch.net>
  • Loading branch information
sudo-bmitch committed Aug 18, 2023
1 parent 1d6a0df commit 68b9389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conformance/02_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ var test02Push = func() {
Equal(http.StatusMethodNotAllowed),
))
if emptyLayerManifestRef != "" {
req = client.NewRequest(reggie.DELETE, emptyLayerManifestRef)
req = client.NewRequest(reggie.DELETE, "/v2/<name>/manifests/<reference>", reggie.WithReference(emptyLayerManifestDigest))
resp, err = client.Do(req)
Expect(err).To(BeNil())
Expect(resp.StatusCode()).To(SatisfyAny(
Expand Down Expand Up @@ -452,7 +452,7 @@ var test02Push = func() {
Equal(http.StatusMethodNotAllowed),
))
if emptyLayerManifestRef != "" {
req = client.NewRequest(reggie.DELETE, emptyLayerManifestRef)
req = client.NewRequest(reggie.DELETE, "/v2/<name>/manifests/<reference>", reggie.WithReference(emptyLayerManifestDigest))
resp, err = client.Do(req)
Expect(err).To(BeNil())
Expect(resp.StatusCode()).To(SatisfyAny(
Expand Down
2 changes: 2 additions & 0 deletions conformance/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ var (
layerBlobDigest string
layerBlobContentLength string
emptyLayerManifestContent []byte
emptyLayerManifestDigest string
nonexistentManifest string
emptyJSONBlob []byte
emptyJSONDescriptor Descriptor
Expand Down Expand Up @@ -299,6 +300,7 @@ func init() {
if err != nil {
log.Fatal(err)
}
emptyLayerManifestDigest = string(godigest.FromBytes(emptyLayerManifestContent))

nonexistentManifest = ".INVALID_MANIFEST_NAME"
invalidManifestContent = []byte("blablabla")
Expand Down

0 comments on commit 68b9389

Please sign in to comment.