diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 15:39:48 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 15:39:48 +0000 |
| commit | 1db877d53c4ff45971c69fecc5165c352ec316c9 (patch) | |
| tree | 4e63366e49430320117ac7d207b9c2f034f8f7b5 /tests/common | |
| parent | 7dcbc84806e7b3000835eb9132dfc4e9003e382a (diff) | |
test: add test_state_event_syncs_from_remote integration test
Implements Phase 3 of the purgatory sync integration test plan.
Key changes:
- Add immediate sync triggering for sync-received events that go to
purgatory (instead of default 3-minute delay for user-submitted events)
- TestRelay now respects RUST_LOG environment variable for debugging
- New test verifies end-to-end flow: state event syncs from source relay,
enters purgatory, git data is fetched from source's clone URL, and
event is released and served
Diffstat (limited to 'tests/common')
| -rw-r--r-- | tests/common/relay.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/common/relay.rs b/tests/common/relay.rs index 55cc18e..8d20da6 100644 --- a/tests/common/relay.rs +++ b/tests/common/relay.rs | |||
| @@ -144,10 +144,9 @@ impl TestRelay { | |||
| 144 | .env("NGIT_SYNC_STARTUP_JITTER_MS", "0") // No jitter for tests | 144 | .env("NGIT_SYNC_STARTUP_JITTER_MS", "0") // No jitter for tests |
| 145 | .env("NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS", "1") // Fast reconnect attempts for tests | 145 | .env("NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS", "1") // Fast reconnect attempts for tests |
| 146 | .env("NGIT_SYNC_BASE_BACKOFF_SECS", "1") // Fast backoff for tests (1s instead of 5s default) | 146 | .env("NGIT_SYNC_BASE_BACKOFF_SECS", "1") // Fast backoff for tests (1s instead of 5s default) |
| 147 | .env("RUST_LOG", "info") // Enable INFO logging for diagnostics | 147 | .env("RUST_LOG", std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string())) // Use RUST_LOG from environment or default to info |
| 148 | .stdout(Stdio::null()) // Disable stderr for cleaner test output | 148 | .stdout(Stdio::null()) // Suppress stdout for cleaner test output |
| 149 | // .stdout(Stdio::inherit()) // Show stdout for diagnostics | 149 | .stderr(Stdio::null()); // Suppress stderr for cleaner test output |
| 150 | .stderr(Stdio::null()); // Disable stderr for cleaner test output | ||
| 151 | 150 | ||
| 152 | // Add bootstrap relay URL if provided | 151 | // Add bootstrap relay URL if provided |
| 153 | if let Some(ref bootstrap_url) = bootstrap_relay_url { | 152 | if let Some(ref bootstrap_url) = bootstrap_relay_url { |