opencontainers/distribution-spec

[conformance] Allow 404 on tag list for management test

shizhMSFT opened this issue · 0 comments

The management test of conformance test tries to list tags after deleting the last manifest, and the test expect 200 with an empty list.

g.Specify("GET request to tags list should reflect manifest deletion", func() {
SkipIfDisabled(contentManagement)
req := client.NewRequest(reggie.GET, "/v2/<name>/tags/list")
resp, err := client.Do(req)
Expect(err).To(BeNil())
Expect(resp.StatusCode()).To(Equal(http.StatusOK))
tagList := &TagList{}
jsonData := []byte(resp.String())
err = json.Unmarshal(jsonData, tagList)
Expect(err).To(BeNil())
Expect(len(tagList.Tags)).To(BeNumerically("<", numTags))
})

The test makes sense if the repository is explicitly created. However, some registry providers consider that the repositories are virtual. That is, when the last manifest is deleted from the repository, the repository is considered non-existing. In that case, calling to the tag list API should return 404 since the repository is not found.