From 1db877d53c4ff45971c69fecc5165c352ec316c9 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 7 Jan 2026 15:39:48 +0000 Subject: 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 --- tests/common/relay.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/common') 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 { .env("NGIT_SYNC_STARTUP_JITTER_MS", "0") // No jitter for tests .env("NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS", "1") // Fast reconnect attempts for tests .env("NGIT_SYNC_BASE_BACKOFF_SECS", "1") // Fast backoff for tests (1s instead of 5s default) - .env("RUST_LOG", "info") // Enable INFO logging for diagnostics - .stdout(Stdio::null()) // Disable stderr for cleaner test output - // .stdout(Stdio::inherit()) // Show stdout for diagnostics - .stderr(Stdio::null()); // Disable stderr for cleaner test output + .env("RUST_LOG", std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string())) // Use RUST_LOG from environment or default to info + .stdout(Stdio::null()) // Suppress stdout for cleaner test output + .stderr(Stdio::null()); // Suppress stderr for cleaner test output // Add bootstrap relay URL if provided if let Some(ref bootstrap_url) = bootstrap_relay_url { -- cgit v1.2.3