Skip to content

refactor: share config command test isolation - #1871

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/config-test-isolation-20260905
Sep 5, 2026
Merged

refactor: share config command test isolation#1871
vincentkoc merged 1 commit into
mainfrom
refactor/config-test-isolation-20260905

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Removes repeated config-path isolation setup from 36 config command tests.

Why This Change Was Made

Introduces one test helper that preserves the existing environment-clearing, temporary-directory, config-path, HOME, XDG_CONFIG_HOME, and CRABBOX_CONFIG setup in the same order. All assertions, environment sentinels, config bytes, negative tests, test names, errors, JSON checks, and application invocations remain unchanged.

User Impact

No user-visible behavior change. This is a test-only refactor that removes 169 lines of duplicated setup.

Evidence

  • Replaced 36 byte-identical setup blocks: 7 config-set tests and 29 config-show tests.
  • Inverse reconstruction of every helper call reproduced the original file byte-for-byte, including comments and spacing.
  • Verified gofmt and git diff --check.
  • Confirmed the concurrent Parallels redaction change in fix(parallels): macOS leases connect when Tools cannot report the guest #1745 is outside the changed setup blocks.
  • Local Go tests were not run due to host budget policy.
  • Full hosted pull-request CI is pending.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

ClawSweeper will not retry this unchanged revision.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 5, 2026 08:12
@vincentkoc
vincentkoc merged commit add8988 into main Sep 5, 2026
29 of 30 checks passed
@vincentkoc
vincentkoc deleted the refactor/config-test-isolation-20260905 branch September 5, 2026 08:12
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.

1 participant