From bdb2a99fe7f146f7cce8e23b7f308abccddf22e2 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 7 Jan 2026 14:54:37 +0000 Subject: Add purgatory sync test helpers Add tests/common/purgatory_helpers.rs with utilities for purgatory sync integration tests: - Git repository setup helpers (create_test_repo_with_commit, add_commit_to_repo, create_branch) for deterministic test commits - State event creation (create_state_event) for kind 30618 events with refs/heads/*, refs/tags/*, and HEAD tags - PR event creation (create_pr_event) for kind 1618 events with a and c tags - Purgatory state inspection helpers (wait_for_event_served, verify_event_not_served) for polling event availability - Git ref verification (check_ref_at_commit) for validating remote refs - Push helper (push_to_relay) for pushing local repos to relay All helpers include comprehensive unit tests verifying correct tag structure and git operations. --- tests/common/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/common/mod.rs') diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 37ac3bb..f511163 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -2,8 +2,10 @@ #![allow(dead_code)] // Test helpers may not be used in all test configurations #![allow(unused_imports)] // Re-exports may not be used in all test configurations +pub mod purgatory_helpers; pub mod relay; pub mod sync_helpers; +pub use purgatory_helpers::*; pub use relay::TestRelay; pub use sync_helpers::*; -- cgit v1.2.3