(t *testing.T)
| 13 | const binDir = "../../bin" |
| 14 | |
| 15 | func TestHelpInAllExecMode(t *testing.T) { |
| 16 | t.Parallel() |
| 17 | t.Run("cli plugin help", func(t *testing.T) { |
| 18 | res, err := ExecWithContext(t.Context(), "docker", "agent", "help") |
| 19 | require.NoError(t, err) |
| 20 | require.Contains(t, res.Stdout, "docker agent run ./agent.yaml") |
| 21 | }) |
| 22 | |
| 23 | t.Run("docker-agent help", func(t *testing.T) { |
| 24 | res, err := ExecWithContext(t.Context(), binDir+"/docker-agent", "help") |
| 25 | require.NoError(t, err) |
| 26 | require.Contains(t, res.Stdout, "docker-agent run ./agent.yaml") |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | func TestExecMissingKeys(t *testing.T) { |
| 31 | t.Parallel() |
nothing calls this directly
no test coverage detected