Skip to content

Comments

fix: isolate smoke test from user's real config directory#77

Draft
Copilot wants to merge 2 commits intoe2e-smoke-testfrom
copilot/sub-pr-74-again
Draft

fix: isolate smoke test from user's real config directory#77
Copilot wants to merge 2 commits intoe2e-smoke-testfrom
copilot/sub-pr-74-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

The smoke test was deleting ~/.config/c8ctl/session.json directly, risking disruption of a developer's local environment when run manually.

Changes

  • At script startup, create a temp directory and export it as XDG_CONFIG_HOME, redirecting all CLI config/session I/O away from the user's real ~/.config/
  • Register a trap to delete the temp dir on EXIT (success or failure)
  • No changes needed to cleanup_session — it already resolves config dir via ${XDG_CONFIG_HOME:-$HOME/.config}, so it transparently targets the isolated dir
TEST_TMPDIR=$(mktemp -d)
export XDG_CONFIG_HOME="$TEST_TMPDIR"
trap 'rm -rf "$TEST_TMPDIR"' EXIT

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: mschoe <2777965+mschoe@users.noreply.github.com>
Copilot AI changed the title [WIP] Update stacked PR to address feedback on E2E smoke test fix: isolate smoke test from user's real config directory Feb 20, 2026
Copilot AI requested a review from mschoe February 20, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants