diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-05 12:03:52 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-05 12:03:52 +0000 |
| commit | 339b0c02f2cec25ae804dc882f5ce7d1dd58b9a6 (patch) | |
| tree | e3d80676913de96c2ac75eb2dc9a8954c88ab633 /tests | |
| parent | ef7ba7c59b8e0b6369f63b8a46e202693963d92b (diff) | |
rename sunc_bootstrap_relay_url
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/common/relay.rs | 14 | ||||
| -rw-r--r-- | tests/proactive_sync_multi.rs | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/common/relay.rs b/tests/common/relay.rs index 21d6deb..dbfd8de 100644 --- a/tests/common/relay.rs +++ b/tests/common/relay.rs | |||
| @@ -41,7 +41,7 @@ impl TestRelay { | |||
| 41 | Self::start_with_options(port, None).await | 41 | Self::start_with_options(port, None).await |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | /// Start relay with sync from another relay | 44 | /// Start relay with sync from another relay (bootstrap relay) |
| 45 | /// | 45 | /// |
| 46 | /// # Example | 46 | /// # Example |
| 47 | /// | 47 | /// |
| @@ -57,12 +57,12 @@ impl TestRelay { | |||
| 57 | /// source.stop().await; | 57 | /// source.stop().await; |
| 58 | /// } | 58 | /// } |
| 59 | /// ``` | 59 | /// ``` |
| 60 | pub async fn start_with_sync(sync_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(sync_relay_url.to_string())).await | 61 | Self::start_with_options(Self::find_free_port(), Some(bootstrap_relay_url.to_string())).await |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | /// Start relay with options | 64 | /// Start relay with options |
| 65 | async fn start_with_options(port: u16, sync_relay_url: Option<String>) -> Self { | 65 | async fn start_with_options(port: u16, bootstrap_relay_url: Option<String>) -> Self { |
| 66 | let bind_address = format!("127.0.0.1:{}", port); | 66 | let bind_address = format!("127.0.0.1:{}", port); |
| 67 | let url = format!("ws://127.0.0.1:{}", port); | 67 | let url = format!("ws://127.0.0.1:{}", port); |
| 68 | 68 | ||
| @@ -97,9 +97,9 @@ impl TestRelay { | |||
| 97 | .stdout(Stdio::null()) | 97 | .stdout(Stdio::null()) |
| 98 | .stderr(Stdio::null()); | 98 | .stderr(Stdio::null()); |
| 99 | 99 | ||
| 100 | // Add sync relay URL if provided | 100 | // Add bootstrap relay URL if provided |
| 101 | if let Some(ref sync_url) = sync_relay_url { | 101 | if let Some(ref bootstrap_url) = bootstrap_relay_url { |
| 102 | cmd.env("NGIT_SYNC_RELAY_URL", sync_url); | 102 | cmd.env("NGIT_SYNC_BOOTSTRAP_RELAY_URL", bootstrap_url); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | let process = cmd.spawn().expect("Failed to start relay process"); | 105 | let process = cmd.spawn().expect("Failed to start relay process"); |
diff --git a/tests/proactive_sync_multi.rs b/tests/proactive_sync_multi.rs index ee29f24..e07ddbe 100644 --- a/tests/proactive_sync_multi.rs +++ b/tests/proactive_sync_multi.rs | |||
| @@ -170,7 +170,7 @@ async fn test_sync_configuration_applied() { | |||
| 170 | tokio::time::sleep(Duration::from_millis(300)).await; | 170 | tokio::time::sleep(Duration::from_millis(300)).await; |
| 171 | 171 | ||
| 172 | // Both relays should be running | 172 | // Both relays should be running |
| 173 | // The sync relay has NGIT_SYNC_RELAY_URL set (verified by relay starting) | 173 | // The sync relay has NGIT_SYNC_BOOTSTRAP_RELAY_URL set (verified by relay starting) |
| 174 | 174 | ||
| 175 | let client_source = Client::default(); | 175 | let client_source = Client::default(); |
| 176 | client_source | 176 | client_source |