Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Jan 25, 2024
1 parent 9da1be0 commit 2e41840
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/e2e/suite/command/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var _ = Describe("ORAS beginners:", func() {

var _ = Describe("1.1 registry users:", func() {
When("running attach command", func() {
It("should attach a file to a subject", func() {
It("should attach a file to a subject and output status", func() {
testRepo := attachTestRepo("simple")
CopyZOTRepo(ImageRepo, testRepo)
subjectRef := RegistryRef(ZOTHost, testRepo, foobar.Tag)
Expand All @@ -106,8 +106,7 @@ var _ = Describe("1.1 registry users:", func() {
CopyZOTRepo(ImageRepo, testRepo)
// test
ref := ORAS("attach", "--artifact-type", "test/attach", subjectRef, fmt.Sprintf("%s:%s", foobar.AttachFileName, foobar.AttachFileMedia), "--export-manifest", exportName, "--format", "{{.Ref}}").
WithWorkDir(tempDir).
MatchStatus([]match.StateKey{foobar.AttachFileStateKey}, false, 1).Exec().Out.Contents()
WithWorkDir(tempDir).Exec().Out.Contents()
// validate
fetched := ORAS("manifest", "fetch", string(ref)).Exec().Out.Contents()
MatchFile(filepath.Join(tempDir, exportName), string(fetched), DefaultTimeout)
Expand Down

0 comments on commit 2e41840

Please sign in to comment.