Bläddra i källkod

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

Fix the rm test without force
Djordje Lukic 5 år sedan
förälder
incheckning
2b29069255
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      multierror/multierror.go
  2. 1 1
      multierror/multierror_test.go
  3. 1 1
      tests/aci-e2e/e2e-aci_test.go

+ 1 - 1
multierror/multierror.go

@@ -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))

+ 1 - 1
multierror/multierror_test.go

@@ -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")
 }

+ 1 - 1
tests/aci-e2e/e2e-aci_test.go

@@ -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,
 		})
 	})