--- EnsureCommand tests ---
(t *testing.T)
| 13 | // --- EnsureCommand tests --- |
| 14 | |
| 15 | func 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 | |
| 28 | func TestEnsureCommand_DisabledGlobally(t *testing.T) { |
| 29 | t.Setenv("DOCKER_AGENT_AUTO_INSTALL", "false") |
nothing calls this directly
no test coverage detected