Skip to content

fix(test): isolate GPG signing key unit tests from host git config#233

Merged
skevetter merged 1 commit into
mainfrom
4370-a2d1-ws-a-gpg-skip
May 7, 2026
Merged

fix(test): isolate GPG signing key unit tests from host git config#233
skevetter merged 1 commit into
mainfrom
4370-a2d1-ws-a-gpg-skip

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

The writeGitConfig() test helper in cmd/ssh_test.go sets HOME, XDG_CONFIG_HOME, and GIT_CONFIG_GLOBAL to isolate tests from host git configuration, but does not block system-level or local repository git config from leaking through. On hosts with a GPG signing key configured (in /etc/gitconfig or the repo's .git/config), the host key corrupts test assertions.

This adds GIT_CONFIG_SYSTEM pointed to /dev/null and GIT_DIR pointed to a fresh empty .git directory in the temp home, fully isolating all six TestGpgSigningKey_* tests from any host git configuration.

@netlify

netlify Bot commented May 5, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit e81625e
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/69fa7428002fd2000813d138

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@skevetter has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 41 minutes and 13 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1425a502-0a40-4b43-b7b1-e3da080f4f1e

📥 Commits

Reviewing files that changed from the base of the PR and between ad731d4 and e81625e.

📒 Files selected for processing (1)
  • cmd/ssh_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/l label May 5, 2026
@skevetter
skevetter force-pushed the 4370-a2d1-ws-a-gpg-skip branch from c4a905d to e81625e Compare May 5, 2026 22:50
@skevetter
skevetter marked this pull request as ready for review May 5, 2026 22:51
@github-actions github-actions Bot added size/xs and removed size/l labels May 5, 2026
@skevetter
skevetter enabled auto-merge (squash) May 5, 2026 22:58
@skevetter
skevetter disabled auto-merge May 5, 2026 23:02
@skevetter
skevetter merged commit c6034f3 into main May 7, 2026
139 of 142 checks passed
@skevetter
skevetter deleted the 4370-a2d1-ws-a-gpg-skip branch May 7, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant