cli/command/image: remove uses of pkg/errors in tests

While there may be reasons to keep pkg/errors in production code,
we don't need them for these tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-02-01 14:41:04 +01:00
parent d30c894af1
commit f29fdd3091
8 changed files with 17 additions and 17 deletions

View File

@ -1,13 +1,13 @@
package image
import (
"errors"
"io"
"strings"
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types/image"
"github.com/pkg/errors"
"gotest.tools/v3/assert"
)
@ -33,7 +33,7 @@ func TestNewPushCommandErrors(t *testing.T) {
args: []string{"image:repo"},
expectedError: "Failed to push",
imagePushFunc: func(ref string, options image.PushOptions) (io.ReadCloser, error) {
return io.NopCloser(strings.NewReader("")), errors.Errorf("Failed to push")
return io.NopCloser(strings.NewReader("")), errors.New("Failed to push")
},
},
}