mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
conformance: fix http status codes for MANIFEST DELETE failures.
Previously returning 404s as failure code, dist-spec says 400s.
This commit is contained in:
@@ -531,7 +531,7 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
||||
// 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)
|
||||
So(resp.StatusCode(), ShouldEqual, 400)
|
||||
// delete manifest by digest
|
||||
resp, err = resty.R().Delete(baseURL + "/v2/repo7/manifests/" + digest.String())
|
||||
So(err, ShouldBeNil)
|
||||
@@ -543,7 +543,7 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
||||
// delete again should fail
|
||||
resp, err = resty.R().Delete(baseURL + "/v2/repo7/manifests/" + digest.String())
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 404)
|
||||
So(resp.StatusCode(), ShouldEqual, 400)
|
||||
|
||||
// check/get by tag
|
||||
resp, err = resty.R().Head(baseURL + "/v2/repo7/manifests/test:1.0")
|
||||
|
||||
Reference in New Issue
Block a user