mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
manifest can be deleted only by digest and not tag
Fixes issue #67. As per dist spec, DELETE of a image manifest can only be done with digest as <reference> param. Previously, tags were being allowed as well. This is not conformant to the spec.
This commit is contained in:
@@ -467,9 +467,13 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
||||
So(resp.StatusCode(), ShouldEqual, 200)
|
||||
So(resp.Body(), ShouldNotBeEmpty)
|
||||
|
||||
// delete manifest
|
||||
// delete manifest by tag should fail
|
||||
resp, err = resty.R().Delete(baseURL + "/v2/repo7/manifests/test:1.0")
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 404)
|
||||
// delete manifest by digest
|
||||
resp, err = resty.R().Delete(baseURL + "/v2/repo7/manifests/" + digest.String())
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 202)
|
||||
// delete again should fail
|
||||
resp, err = resty.R().Delete(baseURL + "/v2/repo7/manifests/" + digest.String())
|
||||
|
||||
Reference in New Issue
Block a user