Permalink
Browse files

Update non-existent rm test

Signed-off-by: Joffrey F <joffrey@docker.com>
  • Loading branch information...
shin- committed Oct 3, 2017
1 parent 9425a0c commit 47068ae5853d2f7136155b09673ec4153d89972d
Showing with 4 additions and 4 deletions.
  1. +1 −1 commands/version_test.go
  2. +1 −1 its/cli/create_rm_test.go
  3. +2 −2 libmachine/mcnerror/errors.go
View
@@ -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) {
@@ -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() {
@@ -17,15 +17,15 @@ 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 {
Name 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 {

0 comments on commit 47068ae

Please sign in to comment.