TestRunNonexisting ensures correct behaviour when running a nonexistent plugin.
(t *testing.T)
| 12 | |
| 13 | // TestRunNonexisting ensures correct behaviour when running a nonexistent plugin. |
| 14 | func TestRunNonexisting(t *testing.T) { |
| 15 | run, _, cleanup := prepare(t) |
| 16 | defer cleanup() |
| 17 | |
| 18 | res := icmd.RunCmd(run("nonexistent")) |
| 19 | res.Assert(t, icmd.Expected{ |
| 20 | ExitCode: 1, |
| 21 | Out: icmd.None, |
| 22 | }) |
| 23 | golden.Assert(t, res.Stderr(), "docker-nonexistent-err.golden") |
| 24 | } |
| 25 | |
| 26 | // TestHelpNonexisting ensures correct behaviour when invoking help on a nonexistent plugin. |
| 27 | func TestHelpNonexisting(t *testing.T) { |