Skip to content

Commit

Permalink
add e2e for discover
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
  • Loading branch information
qweeah committed Jan 25, 2024
1 parent ec86ba2 commit b6b9b38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/e2e/suite/command/discover.go
Original file line number Diff line number Diff line change
@@ -178,12 +178,18 @@ var _ = Describe("1.1 registry users:", func() {
It("should all referrers of a subject", func() {
referrers := []ocispec.Descriptor{foobar.SBOMImageReferrer, foobar.SBOMImageReferrer}
err := ORAS("discover", subjectRef, "--format", format).
MatchErrKeyWords(feature.Deprecated.Mark).
MatchKeyWords(append(discoverKeyWords(false, referrers...), foobar.Digest)...).
Exec().Err
Expect(err).NotTo(gbytes.Say(feature.Deprecated.Mark))
})
})
When("running discover command with go-template output", Focus, func() {
It("should show referrers digest of a subject", func() {
ORAS("discover", subjectRef, "--format", "{{(first .Manifests).Ref}}").
MatchContent(RegistryRef(ZOTHost, ArtifactRepo, foobar.SBOMImageReferrer.Digest.String())).
Exec()
})
})
})

var _ = Describe("1.0 registry users:", func() {

0 comments on commit b6b9b38

Please sign in to comment.