mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
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:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user