testsuite: add borg1_hardlink_master/slave/hardlinkable unit tests, refs #9556#9685
Merged
ThomasWaldmann merged 1 commit intoMay 31, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9685 +/- ##
==========================================
+ Coverage 83.87% 83.95% +0.07%
==========================================
Files 93 93
Lines 15586 15586
Branches 2335 2335
==========================================
+ Hits 13073 13085 +12
+ Misses 1785 1775 -10
+ Partials 728 726 -2 ☔ View full report in Codecov by Sentry. |
85ed3e9 to
aa4b529
Compare
aa4b529 to
de5590f
Compare
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.
Description
Unit tests for
borg1_hardlinkable,borg1_hardlink_master, andborg1_hardlink_slave, refs #9556.legacy/helpers.pyhas three predicates thatUpgraderFrom12To20.upgrade_item()uses to tell hardlink masters from slaves from regular items. PR #9675 tests the upgrade flow end to end, but these predicates themselves had no coverage. This PR addssrc/borg/testsuite/legacy_helpers_test.pywith 13 tests covering all three.src/borg/testsuite/legacy_helpers_test.py-- 13 tests:borg1_hardlinkable(7 tests):borg1_hardlink_master(3 tests):hardlink_masterkey absent → Falsehardlink_master=False→ Falseborg1_hardlink_slave(3 tests):sourcepresent, regular file → Truesourcepresent, FIFO (non-regular hardlinkable type) → Truesource→ FalseRefs #9556
Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)