Files
DanConwayDev d47b9929d5 test(sync): reuse repository identity across relay fixtures
Paired setup calls constructed separate announcements, state events and Git
commits for the same owner/identifier. Discovery could exchange those
replaceable events while setup waited for an exact ID, making fixture
identity depend on timestamp and event-ID ordering.

Prepare one RepositoryFixture and install its unchanged signed events and
Git data on each relay. Migrate all sixteen paired scenarios in descendant,
discovery, live-sync, metrics and tag-variation tests. Historic tests retain
the target listener reservation before seeding the source, so the original
announcement can list both endpoints without starting target sync early.

Keep exact-ID visibility checks, their deadlines and failure diagnostics.
Add a wire-level regression checking both event IDs and remote Git refs
after repeated installation. Production replacement policy, dependencies,
intentional revision tests and concurrency remain unchanged.

Validation: rustfmt and whitespace checks pass; paired setup callers audited.
The new regression and migrated scenarios await CI execution, per the request
to keep Cargo tests on CI/host. The preceding diagnostic CI revision stopped
at a GitHub archive HTTP 504 before Rust tests and gave no further evidence
about the original setup failure.

Assisted-by: Codex (GPT-6)
2026-09-15 07:45:52 +00:00

54 lines
1.6 KiB
Rust

//! Proactive Sync Integration Tests
//!
//! This test file organizes tests for ngit-grasp's proactive sync functionality.
//! Tests are grouped into submodules by sync scenario:
//!
//! - `historic_sync` - Tests for sync from pre-configured bootstrap relay (historic events)
//! - `discovery` - Tests for relay discovery from announcement events
//! - `live_sync` - Tests for real-time sync after connection established
//! - `tag_variations` - Tests for different Layer 2/3 tag types
//! - `catchup` - Tests for catchup sync after disconnect (not yet implemented)
//! - `metrics` - Tests for Prometheus metrics integration
//!
//! # Running Tests
//!
//! ```bash
//! # Run all sync tests
//! cargo test --test sync
//!
//! # Run with output
//! cargo test --test sync -- --nocapture
//!
//! # Run specific test
//! cargo test --test sync test_bootstrap_syncs -- --nocapture
//!
//! # Run ignored tests (like catchup)
//! cargo test --test sync -- --ignored
//! ```
// Include the common test utilities
mod common;
// Include sync test submodules (located in tests/sync/)
mod sync {
pub mod adaptive_pagination;
pub mod catchup;
pub mod descendant_sync;
pub mod discovery;
pub mod historic_recovery;
pub mod historic_sync;
pub mod live_sync;
pub mod maintainer_reprocessing;
pub mod metrics;
pub mod naughty_list_scheduling;
pub mod neg_concurrency;
pub mod outbound_auth;
pub mod proactive_sync_plus;
pub mod purgatory_fetch;
pub mod reconnect_backoff;
pub mod repository_fixture;
pub mod req_concurrency;
pub mod stale_connect_result;
pub mod tag_variations;
}