Update non-existent rm test
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user