Browse code

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 authored on 2014/09/02 09:09:52
Showing 1 changed files
... ...
@@ -41,8 +41,10 @@ func TestDockerRunEchoStdoutWithMemoryLimit(t *testing.T) {
41 41
 	out, _, _, err := runCommandWithStdoutStderr(runCmd)
42 42
 	errorOut(err, t, out)
43 43
 
44
-	if out != "test\n" {
45
-		t.Errorf("container should've printed 'test'")
44
+	out = strings.Trim(out, "\r\n")
45
+
46
+	if expected := "test"; out != expected {
47
+		t.Errorf("container should've printed %q but printed %q", expected, out)
46 48
 
47 49
 	}
48 50