Skip to content

Commit 903ee43

Browse files
shuo-wuCopilot
andcommitted
test: add unit and integration tests for linked-clone entrypoint lifecycle
Integration tests against a real SPDK target: - Linked-clone volume read/write and independent snapshots - Source replica/snapshot deletion blocked by active clone entrypoints - Recovery of entrypoint and clone info after restart - syncCloneEntrypoints auto-cleanup of childless entrypoints and orphaned tmp-head lvols (including correct SPDK state simulation via BdevLvolSnapshot to create a read-only ep + undeleted tmp-head) - Repair of broken clone lineage via syncCloneReplicaInfo - N-replica simultaneous linked-clone via DstReplicaSrcReplicaPairMap Unit tests (no SPDK required): - syncWithBdevLvolMap dispatch to correct sync path - syncCloneReplicaInfo cases 1/2/3 covering entrypoint lookup logic - Full Sync() execution paths (clone replica detection, error paths) Also refactor Sync() to delegate to syncWithBdevLvolMap for testability; spdkClient=nil skips validateAndUpdate so unit tests can exercise sync logic without a live SPDK connection. Longhorn 12552 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Shuo Wu <shuo.wu@suse.com>
1 parent 0294d50 commit 903ee43

4 files changed

Lines changed: 1204 additions & 5 deletions

File tree

0 commit comments

Comments
 (0)