upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/sync.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-18 17:07:30 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-18 17:07:30 +0000
commitd7ea44d5b594763116175325be06c1125983490a (patch)
tree8be8c8a79d2a05457bd3a573a2b32aa00be9b79e /tests/sync.rs
parentc93ffaf30ae43cdaf1cf59684318970beca65979 (diff)
refactor: migrate historic_sync.rs tests to use run_sync_test() helper
- Refactored all 4 tests in historic_sync.rs to use run_sync_test() - Tests maintain same logic and assertions, only setup simplified - Moved run_sync_test() and SyncTestResult outside #[cfg(test)] module - Updated validation to allow empty event slices (for announcement-only tests) - All 4 historic_sync tests passing (test_bootstrap_syncs_existing_layer2_events, test_relay_replays_events_after_restart, test_announcement_not_listing_relay_is_not_synced, test_history_sync_without_negentropy) - Result: 39/40 tests passing (1 more than Phase 1 baseline of 38/40)
Diffstat (limited to 'tests/sync.rs')
-rw-r--r--tests/sync.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sync.rs b/tests/sync.rs
index 2e09fb8..64fd10a 100644
--- a/tests/sync.rs
+++ b/tests/sync.rs
@@ -3,7 +3,7 @@
3//! This test file organizes tests for ngit-grasp's proactive sync functionality. 3//! This test file organizes tests for ngit-grasp's proactive sync functionality.
4//! Tests are grouped into submodules by sync scenario: 4//! Tests are grouped into submodules by sync scenario:
5//! 5//!
6//! - `bootstrap` - Tests for sync from pre-configured bootstrap relay 6//! - `historic_sync` - Tests for sync from pre-configured bootstrap relay (historic events)
7//! - `discovery` - Tests for relay discovery from announcement events 7//! - `discovery` - Tests for relay discovery from announcement events
8//! - `live_sync` - Tests for real-time sync after connection established 8//! - `live_sync` - Tests for real-time sync after connection established
9//! - `tag_variations` - Tests for different Layer 2/3 tag types 9//! - `tag_variations` - Tests for different Layer 2/3 tag types
@@ -31,7 +31,7 @@ mod common;
31 31
32// Include sync test submodules (located in tests/sync/) 32// Include sync test submodules (located in tests/sync/)
33mod sync { 33mod sync {
34 pub mod bootstrap; 34 pub mod historic_sync;
35 pub mod catchup; 35 pub mod catchup;
36 pub mod discovery; 36 pub mod discovery;
37 pub mod live_sync; 37 pub mod live_sync;