initial unified base tests#106
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f46cf912a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR consolidates shared adapter tests into
Confidence Score: 5/5Safe to merge; changes are confined to test infrastructure and one clarifying non-functional tightening of a GitLab adapter method. The production code change (GitLab getOwnerName) removes a fallback path that was acknowledged as intentionally wrong, and all call sites within the repo now pass a valid repositoryId. The test consolidation is mechanical and well-structured. The two findings are both cosmetic: a stale comment and a missing finally in a Gitea-only test override. tests/VCS/Adapter/GiteaTest.php — stale comment and missing finally in testGetRepositoryName. Important Files Changed
Reviews (8): Last reviewed commit: "Merge branch 'main' of https://github.co..." | Re-trigger Greptile |
Migrates all shared adapter tests into Base.php following the dynamic pattern. All tests now create repos dynamically with uniqid() and clean up in finally blocks — no hardcoded owners, repos, or IDs.
Key changes:
Base.php fully rewritten with shared dynamic tests covering repository CRUD, tree, content, branches, commits, clone commands, pull requests, comments, search and owner
All adapter files implement setupAdapter() instead of setUp()
static::$owner and static::$defaultBranch used throughout
Duplicate tests removed from GiteaTest, GitLabTest, GitHubTest
Adapter-specific tests kept only where behavior genuinely differs
getOwnerName made consistent across GitLab and Gitea — requires repositoryId
Admin username changed to root across all adapters for consistency
testListBranchesEmptyRepo skipped in Base — each adapter overrides correctly