diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 14:54:37 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 14:54:37 +0000 |
| commit | bdb2a99fe7f146f7cce8e23b7f308abccddf22e2 (patch) | |
| tree | eecd450d94bb19656341ed2822d12a6b9aa6b801 /tests/common/mod.rs | |
| parent | 3dfec1e449f260295e8c5c505dd1edb82d787c58 (diff) | |
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.
Diffstat (limited to 'tests/common/mod.rs')
| -rw-r--r-- | tests/common/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ | |||
| 2 | #![allow(dead_code)] // Test helpers may not be used in all test configurations | 2 | #![allow(dead_code)] // Test helpers may not be used in all test configurations |
| 3 | #![allow(unused_imports)] // Re-exports may not be used in all test configurations | 3 | #![allow(unused_imports)] // Re-exports may not be used in all test configurations |
| 4 | 4 | ||
| 5 | pub mod purgatory_helpers; | ||
| 5 | pub mod relay; | 6 | pub mod relay; |
| 6 | pub mod sync_helpers; | 7 | pub mod sync_helpers; |
| 7 | 8 | ||
| 9 | pub use purgatory_helpers::*; | ||
| 8 | pub use relay::TestRelay; | 10 | pub use relay::TestRelay; |
| 9 | pub use sync_helpers::*; | 11 | pub use sync_helpers::*; |