Update non-existent rm test

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F
2017-10-02 17:02:31 -07:00
committed by Joffrey F
parent 9425a0c97c
commit 47068ae585
3 changed files with 4 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ func TestCmdVersionNotFound(t *testing.T) {
err := cmdVersion(commandLine, api) 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) { func TestCmdVersionOnHost(t *testing.T) {

View File

@@ -55,7 +55,7 @@ func TestCreateRm(t *testing.T) {
}) })
test.Run("rm non existent machine fails", func() { 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() { test.Run("rm existing machine", func() {

View File

@@ -17,7 +17,7 @@ type ErrHostDoesNotExist struct {
} }
func (e ErrHostDoesNotExist) Error() string { 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 { type ErrHostAlreadyExists struct {
@@ -25,7 +25,7 @@ type ErrHostAlreadyExists struct {
} }
func (e ErrHostAlreadyExists) Error() string { 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 { type ErrDuringPreCreate struct {