conformance: fix error msg for DELETE MANIFEST

---
Ran 27 of 27 Specs in 0.120 seconds
SUCCESS! -- 27 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
---
This commit is contained in:
Ramkumar Chinchani
2020-03-25 11:22:52 -07:00
parent bbed38cfa0
commit 8ff60f9138
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -462,10 +462,11 @@ func (is *ImageStore) DeleteImageManifest(repo string, reference string) error {
return errors.ErrRepoNotFound
}
// as per spec "reference" can only be a digest and not a tag
_, err := godigest.Parse(reference)
if err != nil {
is.log.Error().Err(err).Msg("invalid reference")
return errors.ErrManifestNotFound
return errors.ErrBadManifest
}
buf, err := ioutil.ReadFile(path.Join(dir, "index.json"))