upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/common/sync_helpers.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-18 16:46:53 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-18 16:46:53 +0000
commit6ad7136027c56c3a523278d90ade3da018e39273 (patch)
treedad50501b2085c320a9316e17928b584cc8ec80b /tests/common/sync_helpers.rs
parent11a656fa96d6f60e2d8e8fd31657e24d6cc7cf21 (diff)
sync: turn off negentropy and fix some tests
Diffstat (limited to 'tests/common/sync_helpers.rs')
-rw-r--r--tests/common/sync_helpers.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/common/sync_helpers.rs b/tests/common/sync_helpers.rs
index 7fa0393..e07ad1f 100644
--- a/tests/common/sync_helpers.rs
+++ b/tests/common/sync_helpers.rs
@@ -792,6 +792,14 @@ impl MetricsTestHarness {
792 self.syncing_relay = Some(TestRelay::start_with_sync(Some(source_url)).await); 792 self.syncing_relay = Some(TestRelay::start_with_sync(Some(source_url)).await);
793 } 793 }
794 794
795 /// Start syncing relay on a specific port pointing to source[idx]
796 pub async fn start_syncing_relay_on_port(&mut self, source_idx: usize, port: u16) {
797 let source_url = self.source_relays[source_idx].url().to_string();
798 self.syncing_relay = Some(
799 TestRelay::start_on_port_with_options(port, Some(source_url), false).await,
800 );
801 }
802
795 /// Start syncing relay pointing to random unused port (for failure tests) 803 /// Start syncing relay pointing to random unused port (for failure tests)
796 pub async fn start_syncing_relay_to_nowhere(&mut self) { 804 pub async fn start_syncing_relay_to_nowhere(&mut self) {
797 let port = random_unused_port(); 805 let port = random_unused_port();