setupTestHome redirects HOME to a temp dir and returns the expected lockfile path.
(t *testing.T)
| 13 | |
| 14 | // setupTestHome redirects HOME to a temp dir and returns the expected lockfile path. |
| 15 | func setupTestHome(t *testing.T) string { |
| 16 | t.Helper() |
| 17 | home := t.TempDir() |
| 18 | t.Setenv("HOME", home) |
| 19 | t.Setenv("USERPROFILE", home) |
| 20 | return filepath.Join(home, agentsDir, lockFile) |
| 21 | } |
| 22 | |
| 23 | func TestRecordInstall(t *testing.T) { |
| 24 | tests := []struct { |
no test coverage detected