Repository navigation
Add end-to-end tests for hg repo operations - #2751
Draft
hahn-kev-bot wants to merge 1 commit into
Draft
hahn-kev-bot wants to merge 1 commit into
hahn-kev-bot wants to merge 1 commit into
Conversation
Pin the current observable behaviour of HgService's on-disk repo operations (create, copy, delete, soft delete, backup, reset, upload zip, reset backup cleanup, post-push metadata) through the public API, so the follow-up switch to hgresume's /api/manage endpoints can be verified against it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI summary
This adds end-to-end tests for every operation where LexBox API reads or writes the hg repos directly on the shared volume. It's stage one of moving that work to hgresume's new
/api/manage/*endpoints (#2718). The follow-up PR swaps the implementation, and these tests show it still behaves the same. Only test code changes.The tests only check results through the public API: GraphQL, REST, the TUS upload, and the hgweb and resumable proxies. They never look at disk paths, because disk access is what's being removed.
New tests (
ProjectRepoTests,DeleteProjectTests):.hgat the root, one with.hgnested in a folder plus extra files, and one with no.hg. The no-.hgupload fails withZIP_MISSING_HG_FOLDERand a later upload still works. After each successful upload, a backup is downloaded to check that only.hg/was kept.Extended:
SendReceiveServiceTests.ModifyProjectDatanow checks that after a push over hgweb or resumable, the background metadata job sets the repo size and entry count and leaveshasAbandonedTransactionsfalse.Not covered:
hasAbandonedTransactionsbeing true, because the public API can't leave an interrupted transaction behind.Current behaviour these tests pin:
Test plan
dotnet build backend/Testinganddotnet format whitespaceare clean🤖 Generated with Claude Code