MCPcopy Index your code
hub / github.com/docker/docker-agent / TestHelpInAllExecMode

Function TestHelpInAllExecMode

e2e/binary/binary_test.go:15–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13const binDir = "../../bin"
14
15func 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
30func TestExecMissingKeys(t *testing.T) {
31 t.Parallel()

Callers

nothing calls this directly

Calls 3

ExecWithContextFunction · 0.85
ContextMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected