test: strip every inherited CODEMAN_* var from the suite (split from #476) - #479
Merged
Merged
Conversation
…ff 3099 Split out of Ark0N#476. A Docker Compose deployment exports CODEMAN_CASES_PATH, which bypasses the temp HOME, so route tests wrote into the real case root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GuHtuPiHXdykq9T6rKQJ9n
5 tasks
Owner
|
Merged and shipped in 1.33.0 (https://github.com/Ark0N/Codeman/releases/tag/codeman@1.33.0). Thanks @opticon454 for splitting this out of #476 as asked. Stripping every |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #476 at @Ark0N's request: the test-environment isolation changes, on their own.
What changes
test/setup.tsstrips every inheritedCODEMAN_*variable before the suite runs, not only the named ones. It also deletesCODEMAN_CASES_PATHexplicitly. A Docker Compose deployment sets that variable, and it bypasses the temp HOME, so route tests wrote into the deployment's real case root when the suite ran inside that container. The existing named deletes (and upstream'sCLAUDE_CONFIG_DIRstrip) stay as documentation.test/test-env-isolation.test.tspins both:CODEMAN_CASES_PATHjoinsSTRIPPED_ENV_VARS, and a new case asserts that noCODEMAN_*key survives.test/quick-start.test.tsmoves from port 3099 to 3299 (unused anywhere else in the suite), which it needed when the suite ran inside the deployment container, and givesbeforeAlla 30s timeout.test/respawn-test-plan.md's port table follows.Verification
npx vitest run --config config/vitest.ci.config.ts test/test-env-isolation.test.ts test/quick-start.test.tswithCODEMAN_CASES_PATH=/tmp/x CODEMAN_FOO=1exported: 2 files, 38 tests pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01GuHtuPiHXdykq9T6rKQJ9n