mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
notaryv2: fix 'notation list'
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
f9d14d7f94
commit
45fe129c63
@@ -3322,6 +3322,15 @@ func TestImageSignatures(t *testing.T) {
|
||||
So(msg, ShouldNotBeEmpty)
|
||||
So(strings.Contains(msg, "verification failure"), ShouldBeFalse)
|
||||
|
||||
// check list
|
||||
cmd = exec.Command("notation", "list", "--plain-http", image)
|
||||
out, err = cmd.CombinedOutput()
|
||||
So(err, ShouldBeNil)
|
||||
msg = strings.TrimSuffix(string(out), "\n")
|
||||
So(msg, ShouldNotBeEmpty)
|
||||
_, err = godigest.Parse(msg)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
// verify the image with incorrect key
|
||||
cmd = exec.Command("notation", "verify", "--cert", "bad", "--plain-http", image)
|
||||
out, err = cmd.CombinedOutput()
|
||||
|
||||
+2
-2
@@ -24,9 +24,9 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/notaryproject/notation-go-lib"
|
||||
notreg "github.com/notaryproject/notation/pkg/registry"
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
artifactspec "github.com/oras-project/artifacts-spec/specs-go/v1"
|
||||
httpSwagger "github.com/swaggo/http-swagger"
|
||||
zerr "zotregistry.io/zot/errors"
|
||||
ext "zotregistry.io/zot/pkg/extensions"
|
||||
@@ -1361,7 +1361,7 @@ func getImageManifest(routeHandler *RouteHandler, imgStore storage.ImageStore, n
|
||||
}
|
||||
|
||||
type ReferenceList struct {
|
||||
References []notation.Descriptor `json:"references"`
|
||||
References []artifactspec.Descriptor `json:"references"`
|
||||
}
|
||||
|
||||
// GetReferrers godoc
|
||||
|
||||
Reference in New Issue
Block a user