-
Notifications
You must be signed in to change notification settings - Fork 803
Fix WorktreeSuite tests by adding required Author field #1584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses failing WorktreeSuite tests by ensuring the CommitOptions now include the required Author field.
- Fix failures in TestCommitEmptyOptions by adding defaultSignature() as Author
- Fix failures in TestCommitAmendWithChanges by including Author in the CommitOptions
- Fix failures in TestCheckoutRelativePathSubmoduleInitialized by supplying defaultSignature() as Author
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
worktree_test.go | Updated Commit call in TestCheckoutRelativePathSubmoduleInitialized to include Author |
worktree_commit_test.go | Updated Commit calls in TestCommitEmptyOptions and TestCommitAmendWithChanges to include Author |
1b6896e
to
eed4af6
Compare
Tests were failing due to v6 branch requirement for Author field in CommitOptions. Added defaultSignature() as Author to: - TestCommitEmptyOptions - TestCommitAmendWithChanges - TestCheckoutRelativePathSubmoduleInitialized Signed-off-by: cappyzawa <cappyzawa@gmail.com>
eed4af6
to
4543322
Compare
@cappyzawa I'm not sure this is needed, as per latest merge into
Same as for local using the version in
|
@pjbgf Thanks for checking! I found a potential root cause of the discrepancy between CI and local environments. Issue: go-git cannot read Git user configuration in my local environment, but can in CI. Investigation:
Hypothesis: go-git's configuration parsing may not handle Conclusion: The tests fail in certain local configurations where go-git cannot read user settings. The PR fixes this by explicitly providing the required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cappyzawa thanks for looking into this. The changes should improve the reproduceability of the tests. 🙇
Summary
Background
Before proceeding with the relative submodule URL resolution in PR #1581, we need to ensure that all WorktreeSuite tests pass on the main branch. These tests were failing due to v6 branch requirement for Author field in CommitOptions.
Changes
Test Results
All WorktreeSuite tests now pass successfully: