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