MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / isolatedHome

Function isolatedHome

internal/cli/cli_test.go:46–52  ·  view source on GitHub ↗

isolatedHome rewires HOME and CAM_CONFIG_DIR to a fresh tempdir so commands that write to ~/ touch nothing outside the test.

(t *testing.T)

Source from the content-addressed store, hash-verified

44// isolatedHome rewires HOME and CAM_CONFIG_DIR to a fresh tempdir so commands
45// that write to ~/ touch nothing outside the test.
46func isolatedHome(t *testing.T) string {
47 t.Helper()
48 dir := t.TempDir()
49 t.Setenv("HOME", dir)
50 t.Setenv("CAM_CONFIG_DIR", filepath.Join(dir, "cfg"))
51 return dir
52}
53
54// seedProvider seeds a single provider into the SQLite store at storePath
55// by running `cam provider add` via execute().

Calls

no outgoing calls

Tested by

no test coverage detected