Skip to content

Commit 537b88d

Browse files
committed
cli/command: don't use legacy "notfound" error-type in tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent af83d8f commit 537b88d

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

cli/command/container/create_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,5 +350,5 @@ func TestCreateContainerWithProxyConfig(t *testing.T) {
350350

351351
type fakeNotFound struct{}
352352

353-
func (f fakeNotFound) NotFound() bool { return true }
354-
func (f fakeNotFound) Error() string { return "error fake not found" }
353+
func (f fakeNotFound) NotFound() {}
354+
func (f fakeNotFound) Error() string { return "error fake not found" }

cli/command/image/remove_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ func (n notFound) Error() string {
2121
return fmt.Sprintf("Error: No such image: %s", n.imageID)
2222
}
2323

24-
func (n notFound) NotFound() bool {
25-
return true
26-
}
24+
func (n notFound) NotFound() {}
2725

2826
func TestNewRemoveCommandAlias(t *testing.T) {
2927
cmd := newRemoveCommand(test.NewFakeCli(&fakeClient{}))

cli/command/stack/swarm/deploy_composefile_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ type notFound struct {
1414
error
1515
}
1616

17-
func (n notFound) NotFound() bool {
18-
return true
19-
}
17+
func (n notFound) NotFound() {}
2018

2119
func TestValidateExternalNetworks(t *testing.T) {
2220
testcases := []struct {

0 commit comments

Comments
 (0)