Usage string isn't printed anymore. User is adviced to see help instead
- according to coreutils standard.
Signed-off-by: Michal Minar <miminar@redhat.com>
| ... | ... |
@@ -362,10 +362,10 @@ func TestExecParseError(t *testing.T) {
|
| 362 | 362 |
|
| 363 | 363 |
// Test normal (non-detached) case first |
| 364 | 364 |
cmd := exec.Command(dockerBinary, "exec", "top") |
| 365 |
- if out, _, err := runCommandWithOutput(cmd); err == nil || !strings.Contains(out, "Usage:") {
|
|
| 366 |
- t.Fatalf("Should have thrown error & given usage: %s", out)
|
|
| 365 |
+ if _, stderr, code, err := runCommandWithStdoutStderr(cmd); err == nil || !strings.Contains(stderr, "See '"+dockerBinary+" exec --help'") || code == 0 {
|
|
| 366 |
+ t.Fatalf("Should have thrown error & point to help: %s", stderr)
|
|
| 367 | 367 |
} |
| 368 |
- logDone("exec - error on parseExec should return usage")
|
|
| 368 |
+ logDone("exec - error on parseExec should point to help")
|
|
| 369 | 369 |
} |
| 370 | 370 |
|
| 371 | 371 |
func TestExecStopNotHanging(t *testing.T) {
|