cli/command: don't use legacy "notfound" error-type in tests

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-05-10 22:37:32 +02:00
parent af83d8f5f2
commit 537b88dab9
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
3 changed files with 4 additions and 8 deletions

View File

@ -350,5 +350,5 @@ func TestCreateContainerWithProxyConfig(t *testing.T) {
type fakeNotFound struct{} type fakeNotFound struct{}
func (f fakeNotFound) NotFound() bool { return true } func (f fakeNotFound) NotFound() {}
func (f fakeNotFound) Error() string { return "error fake not found" } func (f fakeNotFound) Error() string { return "error fake not found" }

View File

@ -21,9 +21,7 @@ func (n notFound) Error() string {
return fmt.Sprintf("Error: No such image: %s", n.imageID) return fmt.Sprintf("Error: No such image: %s", n.imageID)
} }
func (n notFound) NotFound() bool { func (n notFound) NotFound() {}
return true
}
func TestNewRemoveCommandAlias(t *testing.T) { func TestNewRemoveCommandAlias(t *testing.T) {
cmd := newRemoveCommand(test.NewFakeCli(&fakeClient{})) cmd := newRemoveCommand(test.NewFakeCli(&fakeClient{}))

View File

@ -14,9 +14,7 @@ type notFound struct {
error error
} }
func (n notFound) NotFound() bool { func (n notFound) NotFound() {}
return true
}
func TestValidateExternalNetworks(t *testing.T) { func TestValidateExternalNetworks(t *testing.T) {
testcases := []struct { testcases := []struct {