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:
Ramkumar Chinchani
2020-01-28 13:55:58 -08:00
parent 8d04f97f17
commit faad2b1d1f
3 changed files with 14 additions and 1 deletions
+3
View File
@@ -115,6 +115,9 @@ func TestAPIs(t *testing.T) {
_, _, _, err = il.GetImageManifest("test", d.String())
So(err, ShouldBeNil)
err = il.DeleteImageManifest("test", "1.0")
So(err, ShouldNotBeNil)
err = il.DeleteImageManifest("test", d.String())
So(err, ShouldBeNil)