From 47068ae5853d2f7136155b09673ec4153d89972d Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Mon, 2 Oct 2017 17:02:31 -0700 Subject: [PATCH] Update non-existent rm test Signed-off-by: Joffrey F --- commands/version_test.go | 2 +- its/cli/create_rm_test.go | 2 +- libmachine/mcnerror/errors.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/version_test.go b/commands/version_test.go index 67a57c57..4978f8e1 100644 --- a/commands/version_test.go +++ b/commands/version_test.go @@ -42,7 +42,7 @@ func TestCmdVersionNotFound(t *testing.T) { err := cmdVersion(commandLine, api) - assert.EqualError(t, err, `Host does not exist: "unknown"`) + assert.EqualError(t, err, `Docker machine "unknown" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.`) } func TestCmdVersionOnHost(t *testing.T) { diff --git a/its/cli/create_rm_test.go b/its/cli/create_rm_test.go index a6ad0af7..dc00c8a4 100644 --- a/its/cli/create_rm_test.go +++ b/its/cli/create_rm_test.go @@ -55,7 +55,7 @@ func TestCreateRm(t *testing.T) { }) test.Run("rm non existent machine fails", func() { - test.Machine("rm ∞ -y").Should().Fail(`Error removing host "∞": Host does not exist: "∞"`) + test.Machine("rm ∞ -y").Should().Fail(`Error removing host "∞": Docker machine "∞" does not exist.`) }) test.Run("rm existing machine", func() { diff --git a/libmachine/mcnerror/errors.go b/libmachine/mcnerror/errors.go index 3a6f914b..6efc3c5c 100644 --- a/libmachine/mcnerror/errors.go +++ b/libmachine/mcnerror/errors.go @@ -17,7 +17,7 @@ type ErrHostDoesNotExist struct { } func (e ErrHostDoesNotExist) Error() string { - return fmt.Sprintf("Docker machine \"%q\" does not exist. Use \"docker-machine ls\" to list machines. Use \"docker-machine create\" to add a new one.", e.Name) + return fmt.Sprintf("Docker machine %q does not exist. Use \"docker-machine ls\" to list machines. Use \"docker-machine create\" to add a new one.", e.Name) } type ErrHostAlreadyExists struct { @@ -25,7 +25,7 @@ type ErrHostAlreadyExists struct { } func (e ErrHostAlreadyExists) Error() string { - return fmt.Sprintf("Docker machine \"%q\" already exists", e.Name) + return fmt.Sprintf("Docker machine %q already exists", e.Name) } type ErrDuringPreCreate struct {