MCPcopy Create free account
hub / github.com/docker/docker-agent / TestEnsureCommand_FoundInPath

Function TestEnsureCommand_FoundInPath

pkg/toolinstall/resolver_test.go:15–26  ·  view source on GitHub ↗

--- EnsureCommand tests ---

(t *testing.T)

Source from the content-addressed store, hash-verified

13// --- EnsureCommand tests ---
14
15func TestEnsureCommand_FoundInPath(t *testing.T) {
16 t.Parallel()
17
18 command := "ls"
19 if _, err := exec.LookPath(command); err != nil {
20 t.Skipf("skipping: %q not in PATH", command)
21 }
22
23 result, err := EnsureCommand(t.Context(), command, "")
24 require.NoError(t, err)
25 assert.Equal(t, command, result)
26}
27
28func TestEnsureCommand_DisabledGlobally(t *testing.T) {
29 t.Setenv("DOCKER_AGENT_AUTO_INSTALL", "false")

Callers

nothing calls this directly

Calls 2

EnsureCommandFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected