upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/sync/historic_sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sync/historic_sync.rs')
-rw-r--r--tests/sync/historic_sync.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/sync/historic_sync.rs b/tests/sync/historic_sync.rs
index c388a7f..aec2819 100644
--- a/tests/sync/historic_sync.rs
+++ b/tests/sync/historic_sync.rs
@@ -29,7 +29,7 @@ async fn test_bootstrap_syncs_existing_layer2_events() {
29 29
30 // Verify announcement synced to syncing relay 30 // Verify announcement synced to syncing relay
31 let filter = Filter::new() 31 let filter = Filter::new()
32 .kind(Kind::Custom(KIND_REPOSITORY_STATE)) 32 .kind(Kind::GitRepoAnnouncement)
33 .author(result.maintainer_keys.public_key()); 33 .author(result.maintainer_keys.public_key());
34 34
35 let synced = 35 let synced =
@@ -64,7 +64,7 @@ async fn test_relay_replays_events_after_restart() {
64 64
65 // Verify announcement synced on first run 65 // Verify announcement synced on first run
66 let filter = Filter::new() 66 let filter = Filter::new()
67 .kind(Kind::Custom(KIND_REPOSITORY_STATE)) 67 .kind(Kind::GitRepoAnnouncement)
68 .author(result.maintainer_keys.public_key()); 68 .author(result.maintainer_keys.public_key());
69 69
70 let synced_first = wait_for_event_on_relay( 70 let synced_first = wait_for_event_on_relay(
@@ -173,7 +173,7 @@ async fn test_announcement_not_listing_relay_is_not_synced() {
173 173
174 // Verify announcement did NOT sync to syncing relay 174 // Verify announcement did NOT sync to syncing relay
175 let filter = Filter::new() 175 let filter = Filter::new()
176 .kind(Kind::Custom(KIND_REPOSITORY_STATE)) 176 .kind(Kind::GitRepoAnnouncement)
177 .author(keys.public_key()); 177 .author(keys.public_key());
178 178
179 let synced = wait_for_event_on_relay(syncing.url(), filter, Duration::from_secs(2)).await; 179 let synced = wait_for_event_on_relay(syncing.url(), filter, Duration::from_secs(2)).await;
@@ -274,7 +274,7 @@ async fn test_history_sync_without_negentropy() {
274 274
275 // Verify announcement synced to syncing relay via HISTORY sync 275 // Verify announcement synced to syncing relay via HISTORY sync
276 let filter = Filter::new() 276 let filter = Filter::new()
277 .kind(Kind::Custom(KIND_REPOSITORY_STATE)) 277 .kind(Kind::GitRepoAnnouncement)
278 .author(keys.public_key()); 278 .author(keys.public_key());
279 279
280 let synced = wait_for_event_on_relay(syncing.url(), filter, Duration::from_secs(5)).await; 280 let synced = wait_for_event_on_relay(syncing.url(), filter, Duration::from_secs(5)).await;
@@ -339,7 +339,7 @@ async fn test_pagination_for_large_historic_sync() {
339 // Create 40 issue events to test pagination (with limit=10, threshold=7) 339 // Create 40 issue events to test pagination (with limit=10, threshold=7)
340 let repo_coord = format!( 340 let repo_coord = format!(
341 "{}:{}:{}", 341 "{}:{}:{}",
342 KIND_REPOSITORY_STATE, 342 Kind::GitRepoAnnouncement.as_u16(),
343 keys.public_key().to_hex(), 343 keys.public_key().to_hex(),
344 repo_id 344 repo_id
345 ); 345 );
@@ -416,16 +416,14 @@ async fn test_pagination_for_large_historic_sync() {
416 416
417 // Verify announcement synced 417 // Verify announcement synced
418 let announcement_filter = Filter::new() 418 let announcement_filter = Filter::new()
419 .kind(Kind::Custom(KIND_REPOSITORY_STATE)) 419 .kind(Kind::GitRepoAnnouncement)
420 .author(keys.public_key()); 420 .author(keys.public_key());
421 421
422 let announcement_synced = 422 let announcement_synced =
423 wait_for_event_on_relay(syncing.url(), announcement_filter, Duration::from_secs(3)).await; 423 wait_for_event_on_relay(syncing.url(), announcement_filter, Duration::from_secs(3)).await;
424 424
425 // Verify ALL 40 issues synced 425 // Verify ALL 40 issues synced
426 let issues_filter = Filter::new() 426 let issues_filter = Filter::new().kind(Kind::GitIssue).author(keys.public_key());
427 .kind(Kind::Custom(KIND_ISSUE))
428 .author(keys.public_key());
429 427
430 // Query for all issues 428 // Query for all issues
431 let temp_keys = Keys::generate(); 429 let temp_keys = Keys::generate();