Merge pull request #459 from docker/fix-aci-rm

Fix the rm test without force
This commit is contained in:
Djordje Lukic 2020-08-11 17:18:23 +02:00 committed by GitHub
commit 2b29069255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ func Append(err error, errs ...error) *Error {
func listErrorFunc(errs []error) string {
if len(errs) == 1 {
return errs[0].Error()
return "Error: " + errs[0].Error()
}
messages := make([]string, len(errs))

View File

@ -61,5 +61,5 @@ func TestErrorOrNil(t *testing.T) {
err = Append(err, errors.New("error"))
e := err.ErrorOrNil()
assert.Error(t, e, "error")
assert.Error(t, e, "Error: error")
}

View File

@ -268,7 +268,7 @@ func TestContainerRun(t *testing.T) {
t.Run("rm a running container", func(t *testing.T) {
res := c.RunDockerCmd("rm", container)
res.Assert(t, icmd.Expected{
Err: fmt.Sprintf("Error: You cannot remove a running container %s. Stop the container before attempting removal or force remove\n", container),
Err: fmt.Sprintf("Error: you cannot remove a running container %s. Stop the container before attempting removal or force remove", container),
ExitCode: 1,
})
})