upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/common
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-05 14:51:16 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-05 14:51:16 +0000
commitb7aa7b72c189290b45fb388ec1826862bc8dda49 (patch)
tree5bb7bccd3a39109cdedbb412c2c9dac508a6b523 /tests/common
parent339b0c02f2cec25ae804dc882f5ce7d1dd58b9a6 (diff)
test: fix proactive sync basic tests
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common/relay.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/common/relay.rs b/tests/common/relay.rs
index dbfd8de..3d160f2 100644
--- a/tests/common/relay.rs
+++ b/tests/common/relay.rs
@@ -58,7 +58,11 @@ impl TestRelay {
58 /// } 58 /// }
59 /// ``` 59 /// ```
60 pub async fn start_with_sync(bootstrap_relay_url: &str) -> Self { 60 pub async fn start_with_sync(bootstrap_relay_url: &str) -> Self {
61 Self::start_with_options(Self::find_free_port(), Some(bootstrap_relay_url.to_string())).await 61 Self::start_with_options(
62 Self::find_free_port(),
63 Some(bootstrap_relay_url.to_string()),
64 )
65 .await
62 } 66 }
63 67
64 /// Start relay with options 68 /// Start relay with options
@@ -91,11 +95,12 @@ impl TestRelay {
91 cmd.env("NGIT_BIND_ADDRESS", &bind_address) 95 cmd.env("NGIT_BIND_ADDRESS", &bind_address)
92 .env("NGIT_DOMAIN", &bind_address) // Set domain to match bind address 96 .env("NGIT_DOMAIN", &bind_address) // Set domain to match bind address
93 .env("NGIT_GIT_DATA_PATH", git_data_dir.path()) 97 .env("NGIT_GIT_DATA_PATH", git_data_dir.path())
98 .env("NGIT_DATABASE_BACKEND", "memory") // Force in-memory database for isolation
94 .env("NGIT_OWNER_NPUB", &test_npub) 99 .env("NGIT_OWNER_NPUB", &test_npub)
95 .env("NGIT_SYNC_STARTUP_JITTER_MS", "0") // Disable jitter for tests 100 .env("NGIT_SYNC_STARTUP_JITTER_MS", "0") // Disable jitter for tests
96 .env("RUST_LOG", "warn") // Less logging during tests 101 .env("RUST_LOG", "warn") // Less logging during tests
97 .stdout(Stdio::null()) 102 .stdout(Stdio::null())
98 .stderr(Stdio::null()); 103 .stderr(Stdio::null()); // Disable stderr for cleaner test output
99 104
100 // Add bootstrap relay URL if provided 105 // Add bootstrap relay URL if provided
101 if let Some(ref bootstrap_url) = bootstrap_relay_url { 106 if let Some(ref bootstrap_url) = bootstrap_relay_url {