Skip to content

Conversation

@Amolith
Copy link
Contributor

@Amolith Amolith commented Dec 4, 2025

Added commit.gpgsign=false to all test repository setup functions to prevent GPG signing prompts during test runs. This ensures tests run non-interactively without requiring YubiKey or other hardware authentication.

I think I stopped counting how many times I tapped my YubiKey during the tests after 10, then after a few more I cancelled and had the LLM add these 😆

Assisted-by: Claude Sonnet 4.5 via Crush

Summary by CodeRabbit

  • Tests
    • Disabled GPG signing for commits in test repositories to prevent signing-related test failures during test execution.

✏️ Tip: You can customize this high-level summary in your review settings.

Added commit.gpgsign=false to all test repository setup functions to
prevent GPG signing prompts during test runs. This ensures tests run
non-interactively without requiring YubiKey or other hardware
authentication.

Affected test setup locations:
- test/e2e/framework/framework.go (CreateTestRepo)
- internal/git/repository_test.go (setupTestRepo)
- internal/git/repository_remove_test.go (initializeTestRepo)

Assisted-by: Claude Sonnet 4.5 via Crush
@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Walkthrough

Three test setup files are updated to disable GPG signing for commits by setting commit.gpgsign to false. This prevents GPG-related failures when creating test repositories, ensuring commits proceed without cryptographic signing requirements.

Changes

Cohort / File(s) Summary
Test GPG signing configuration
internal/git/repository_remove_test.go, internal/git/repository_test.go, test/e2e/framework/framework.go
Adds Git configuration step to disable commit GPG signing (commit.gpgsign=false) in test repository setup functions to prevent signing-related test failures

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • All three changes are identical in nature: a single configuration line added to existing test setup functions
  • Homogeneous changes with repetitive pattern
  • No logic complexity or control flow modifications
  • Configuration-only update

Poem

🐰 A hop through test repos, no signatures signed,
Just commit and move on, leaving GPG behind!
False and set free, the tests run so clean,
No cryptographic hurdles to block the machine.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely describes the main change: disabling GPG signing in test repositories across all affected test setup files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f7387d and 7a2c097.

📒 Files selected for processing (3)
  • internal/git/repository_remove_test.go (1 hunks)
  • internal/git/repository_test.go (1 hunks)
  • test/e2e/framework/framework.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Follow standard Go style with tabs and gofmt; package names must be short and lowercase
Keep import groups tidy; use goimports for organization with local prefix following module path github.com/satococoa/wtp/v2
Adhere to linting rules in .golangci.yml (vet, staticcheck, gosec, mnd, lll=120)
Wrap errors with context; avoid ignoring errors in Go code
Use snake_case for Go filenames (e.g., remove.go, shell_integration.go)
Document exported items in Go when non-trivial; follow godoc conventions

Files:

  • test/e2e/framework/framework.go
  • internal/git/repository_remove_test.go
  • internal/git/repository_test.go
test/e2e/**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

End-to-end tests must be placed in test/e2e and exercise real git workflows using the built binary

Files:

  • test/e2e/framework/framework.go
**/*_test.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*_test.go: Unit tests must be placed alongside packages as *_test.go files in the same directory
Target 70% code coverage with unit tests focusing on fast feedback and mocked git interactions using table-driven test cases

Files:

  • internal/git/repository_remove_test.go
  • internal/git/repository_test.go
🧠 Learnings (2)
📚 Learning: 2025-12-02T13:33:48.673Z
Learnt from: CR
Repo: satococoa/wtp PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-02T13:33:48.673Z
Learning: Applies to test/e2e/**/*.go : End-to-end tests must be placed in `test/e2e` and exercise real git workflows using the built binary

Applied to files:

  • test/e2e/framework/framework.go
  • internal/git/repository_remove_test.go
  • internal/git/repository_test.go
📚 Learning: 2025-12-02T13:33:48.673Z
Learnt from: CR
Repo: satococoa/wtp PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-02T13:33:48.673Z
Learning: Applies to **/*_test.go : Target 70% code coverage with unit tests focusing on fast feedback and mocked git interactions using table-driven test cases

Applied to files:

  • test/e2e/framework/framework.go
  • internal/git/repository_remove_test.go
  • internal/git/repository_test.go
🧬 Code graph analysis (1)
internal/git/repository_test.go (1)
internal/command/types.go (1)
  • Command (4-8)
🔇 Additional comments (3)
test/e2e/framework/framework.go (1)

102-102: LGTM! GPG signing correctly disabled for test repositories.

This change ensures tests run non-interactively without GPG prompts. The placement is correct (after user config, before commits) and uses the existing runInDir helper method consistently with the rest of the function.

internal/git/repository_remove_test.go (1)

37-37: LGTM! Consistent with the file's test helper patterns.

The implementation correctly uses the runGitCommand helper function and is placed appropriately in the test repository initialization flow. This ensures commits in tests won't trigger GPG signing prompts.

internal/git/repository_test.go (1)

39-43: LGTM! Error handling is consistent with other git config commands.

The implementation follows the same pattern as the user.name and user.email configuration in this function, with explicit error handling and clear error messages. The verbose style is appropriate and consistent within this test helper.


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.

@satococoa satococoa self-requested a review December 5, 2025 14:12
Copy link
Owner

@satococoa satococoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!! 👍

@satococoa satococoa merged commit ef72813 into satococoa:main Dec 5, 2025
7 checks passed
@Amolith Amolith deleted the disable-gpg-signing-in-tests branch December 5, 2025 16:13
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