cli/command/container: 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:39:47 +01:00
parent 0d913efe8a
commit 5a99ea9ad4
10 changed files with 14 additions and 14 deletions

View File

@ -1,13 +1,13 @@
package container
import (
"errors"
"io"
"testing"
"github.com/docker/cli/cli"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types/container"
"github.com/pkg/errors"
"gotest.tools/v3/assert"
)
@ -23,7 +23,7 @@ func TestNewAttachCommandErrors(t *testing.T) {
args: []string{"5cb5bb5e4a3b"},
expectedError: "something went wrong",
containerInspectFunc: func(containerID string) (container.InspectResponse, error) {
return container.InspectResponse{}, errors.Errorf("something went wrong")
return container.InspectResponse{}, errors.New("something went wrong")
},
},
{