mirror of https://github.com/docker/cli.git
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:
parent
af83d8f5f2
commit
537b88dab9
|
@ -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" }
|
||||||
|
|
|
@ -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{}))
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue