cli test: TestShipVerbAPIMode names its own config file (Task 1 fix round 1)
The test pinned HOME but not CARLOS_CONFIG. Its working directory is a t.TempDir() under TMPDIR, and where TMPDIR sits inside the operator's home the .carlos/config walk goes up from it to the real ~/.carlos/config, so the verb shipped to that console and log.Fatal'd. CARLOS_CONFIG now names a missing file of the test's own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+5
−0
apimode_test.go+5 −0
diff --git a/apimode_test.go b/apimode_test.go| index 157887e7d..3401d3de7 100644 |
| --- a/apimode_test.go |
| +++ b/apimode_test.go |
| @@ -1054,6 +1054,11 @@ func TestShipVerbAPIMode(t *testing.T) { |
| useTempCredentials(t) |
| clearDeploymentEnv(t) |
| checkNoRegistry := requireNoRegistryTouch(t) |
| + // The working directory useTempCredentials picks is under $TMPDIR, which |
| + // can sit inside the operator's real home; the .carlos/config walk goes |
| + // up from it and would find the real ~/.carlos/config. Name a config |
| + // file of the test's own (missing, so no opinion) and skip discovery. |
| + t.Setenv("CARLOS_CONFIG", filepath.Join(t.TempDir(), "config")) |
| var reqCount int32 |
| mux := http.NewServeMux() |