Skip to content

2503 refactor btrfs setup & teardown for tests - #2504

Draft
PropzSaladaz wants to merge 1 commit into
developfrom
techdebt/refactor-btrfs-teardown-in-tests
Draft

2503 refactor btrfs setup & teardown for tests#2504
PropzSaladaz wants to merge 1 commit into
developfrom
techdebt/refactor-btrfs-teardown-in-tests

Conversation

@PropzSaladaz

Copy link
Copy Markdown
Contributor

Description

Implemented a shared BTRFS test fixture helper to centralize duplicated setup/teardown logic across snapshot-related tests.

The new helper manages sudo identity switching, BTRFS image creation, mount/chown, unmount, and artifact cleanup. It also makes mount path ownership explicit, so fixed test-owned paths can be removed during cleanup while externally owned paths, such as TransientDirectory, are only unmounted and left for their owner to delete.

Updated the BTRFS-backed fixtures in SnapshotManager, HashSnapshot, ClientSnapshots, and JSON-RPC tests to use the shared helper, reducing duplicated lifecycle code and making cleanup behavior consistent across suites.

Fixes #2503

@PropzSaladaz PropzSaladaz self-assigned this Jul 10, 2026
@github-actions

Copy link
Copy Markdown

@PropzSaladaz PropzSaladaz linked an issue Jul 10, 2026 that may be closed by this pull request
@PropzSaladaz PropzSaladaz linked an issue Jul 13, 2026 that may be closed by this pull request
Base automatically changed from feature/2327-add-API-getLatestSnapshotHash to develop July 30, 2026 14:32
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.

Refactor Btrfs setup & teardown in tests

1 participant