Skip to content

Commit

Permalink
Fix cp test calls
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Howe <[email protected]>
  • Loading branch information
TerryHowe committed May 12, 2024
1 parent 9f34f58 commit ad55f63
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/oras/root/cp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ func Test_doCopy(t *testing.T) {
opts.Verbose = true
opts.From.Reference = memDesc.Digest.String()
dst := memory.New()
printer := status.NewPrinter(cmd.OutOrStdout())

Check failure on line 132 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

undefined: status

Check failure on line 132 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

undefined: cmd

Check failure on line 132 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

undefined: status

Check failure on line 132 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

undefined: cmd

Check failure on line 132 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

undefined: status

Check failure on line 132 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

undefined: cmd
// test
_, err = doCopy(context.Background(), memStore, dst, &opts)
_, err = doCopy(context.Background(), printer, memStore, dst, &opts)
if err != nil {
t.Fatal(err)
}
Expand All @@ -151,6 +152,7 @@ func Test_doCopy_skipped(t *testing.T) {
opts.TTY = slave
opts.Verbose = true
opts.From.Reference = memDesc.Digest.String()
printer := status.NewPrinter(cmd.OutOrStdout())

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

printer declared and not used

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

undefined: status

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

undefined: cmd

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

printer declared and not used

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

undefined: status

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

undefined: cmd

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

printer declared and not used

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

undefined: status

Check failure on line 155 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

undefined: cmd
// test
_, err = doCopy(context.Background(), memStore, memStore, &opts)

Check failure on line 157 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

not enough arguments in call to doCopy

Check failure on line 157 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

not enough arguments in call to doCopy

Check failure on line 157 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

not enough arguments in call to doCopy
if err != nil {
Expand Down Expand Up @@ -184,8 +186,9 @@ func Test_doCopy_mounted(t *testing.T) {
t.Fatal(err)
}
to.PlainHTTP = true
printer := status.NewPrinter(cmd.OutOrStdout())

Check failure on line 189 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

undefined: status

Check failure on line 189 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / Analyze (1.22)

undefined: cmd

Check failure on line 189 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

undefined: status

Check failure on line 189 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / build (1.22)

undefined: cmd

Check failure on line 189 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

undefined: status

Check failure on line 189 in cmd/oras/root/cp_test.go

View workflow job for this annotation

GitHub Actions / lint (1.22)

undefined: cmd (typecheck)
// test
_, err = doCopy(context.Background(), from, to, &opts)
_, err = doCopy(context.Background(), printer, from, to, &opts)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit ad55f63

Please sign in to comment.