Browse Source

Add more error info to TestDockerRunEchoStdoutWithMemoryLimit

This test fails on my CI server often so we need more info when it does
happen with this test.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Michael Crosby 11 years ago
parent
commit
c0a5ec75c5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      integration-cli/docker_cli_run_test.go

+ 4 - 2
integration-cli/docker_cli_run_test.go

@@ -41,8 +41,10 @@ func TestDockerRunEchoStdoutWithMemoryLimit(t *testing.T) {
 	out, _, _, err := runCommandWithStdoutStderr(runCmd)
 	errorOut(err, t, out)
 
-	if out != "test\n" {
-		t.Errorf("container should've printed 'test'")
+	out = strings.Trim(out, "\r\n")
+
+	if expected := "test"; out != expected {
+		t.Errorf("container should've printed %q but printed %q", expected, out)
 
 	}