TestHelpNonexisting ensures correct behaviour when invoking help on a nonexistent plugin.
(t *testing.T)
| 25 | |
| 26 | // TestHelpNonexisting ensures correct behaviour when invoking help on a nonexistent plugin. |
| 27 | func TestHelpNonexisting(t *testing.T) { |
| 28 | run, _, cleanup := prepare(t) |
| 29 | defer cleanup() |
| 30 | |
| 31 | res := icmd.RunCmd(run("help", "nonexistent")) |
| 32 | res.Assert(t, icmd.Expected{ |
| 33 | ExitCode: 1, |
| 34 | Out: icmd.None, |
| 35 | }) |
| 36 | golden.Assert(t, res.Stderr(), "docker-help-nonexistent-err.golden") |
| 37 | } |
| 38 | |
| 39 | // TestNonexistingHelp ensures correct behaviour when invoking a |
| 40 | // nonexistent plugin with `--help`. |