From eb6b6775f6be2a431c713e389397dfada4c08619 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Tue, 6 Jan 2015 16:44:36 +0100 Subject: [PATCH] Amended TestExecParseError test Usage string isn't printed anymore. User is adviced to see help instead - according to coreutils standard. Signed-off-by: Michal Minar Upstream-commit: 1db927113f3e7af83fac548c0e2da05bccbd8d56 Component: engine --- components/engine/integration-cli/docker_cli_exec_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_exec_test.go b/components/engine/integration-cli/docker_cli_exec_test.go index 5bb2dc4bb7..2ff39fc832 100644 --- a/components/engine/integration-cli/docker_cli_exec_test.go +++ b/components/engine/integration-cli/docker_cli_exec_test.go @@ -362,10 +362,10 @@ func TestExecParseError(t *testing.T) { // Test normal (non-detached) case first cmd := exec.Command(dockerBinary, "exec", "top") - if out, _, err := runCommandWithOutput(cmd); err == nil || !strings.Contains(out, "Usage:") { - t.Fatalf("Should have thrown error & given usage: %s", out) + if _, stderr, code, err := runCommandWithStdoutStderr(cmd); err == nil || !strings.Contains(stderr, "See '"+dockerBinary+" exec --help'") || code == 0 { + t.Fatalf("Should have thrown error & point to help: %s", stderr) } - logDone("exec - error on parseExec should return usage") + logDone("exec - error on parseExec should point to help") } func TestExecStopNotHanging(t *testing.T) {