From ad55f634800a76449aa808ae11befd923da170a3 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Sun, 12 May 2024 14:48:17 -0600 Subject: [PATCH] Fix cp test calls Signed-off-by: Terry Howe --- cmd/oras/root/cp_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/oras/root/cp_test.go b/cmd/oras/root/cp_test.go index 29301faf5..a13313a39 100644 --- a/cmd/oras/root/cp_test.go +++ b/cmd/oras/root/cp_test.go @@ -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()) // test - _, err = doCopy(context.Background(), memStore, dst, &opts) + _, err = doCopy(context.Background(), printer, memStore, dst, &opts) if err != nil { t.Fatal(err) } @@ -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()) // test _, err = doCopy(context.Background(), memStore, memStore, &opts) if err != nil { @@ -184,8 +186,9 @@ func Test_doCopy_mounted(t *testing.T) { t.Fatal(err) } to.PlainHTTP = true + printer := status.NewPrinter(cmd.OutOrStdout()) // test - _, err = doCopy(context.Background(), from, to, &opts) + _, err = doCopy(context.Background(), printer, from, to, &opts) if err != nil { t.Fatal(err) }