diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-08 11:20:35 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-08 11:23:28 +0000 |
| commit | 5d02ad6b893f9059044914c115d77cf9d8e589c3 (patch) | |
| tree | b727f9c44d2f2d4e203dc2344e4c9bd5144a77dd /tests | |
| parent | 075307804bf66bba10f5bc55cb40e2e6a98a65ee (diff) | |
refactor: replace hardcoded Kind constants with rust-nostr variants
- Replace KIND_REPOSITORY_ANNOUNCEMENT with Kind::GitRepoAnnouncement
- Replace KIND_REPOSITORY_STATE with Kind::RepoState
- Replace KIND_PR with Kind::GitPullRequest
- Replace KIND_PR_UPDATE with Kind::GitPullRequestUpdate
- Replace KIND_USER_GRASP_LIST with Kind::GitUserGraspList
- Replace KIND_PATCH with Kind::GitPatch
- Replace KIND_ISSUE with Kind::GitIssue
- Replace KIND_COMMENT with Kind::Comment
- Replace all Kind::Custom(30617|30618|1617|1618|1619|1621|1111|10317) patterns
- Remove all hardcoded KIND_* constants from events.rs
- Update all match statements to use Kind enum directly
- Update all filter builders to use Kind variants
- Update all test helpers and assertions
Benefits:
- Type safety: compiler prevents wrong kind numbers
- Readability: Kind::GitRepoAnnouncement is self-documenting
- Maintainability: single source of truth (rust-nostr)
- IDE support: full autocompletion and refactoring
- Standards: aligns with rust-nostr best practices
Files modified: 21
Constants removed: 9
Patterns replaced: 100+
Tests passing: 222/222
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/common/purgatory_helpers.rs | 20 | ||||
| -rw-r--r-- | tests/common/sync_helpers.rs | 43 | ||||
| -rw-r--r-- | tests/nip77_negentropy.rs | 11 | ||||
| -rw-r--r-- | tests/purgatory_sync.rs | 2 | ||||
| -rw-r--r-- | tests/sync/discovery.rs | 28 | ||||
| -rw-r--r-- | tests/sync/historic_sync.rs | 16 | ||||
| -rw-r--r-- | tests/sync/live_sync.rs | 14 | ||||
| -rw-r--r-- | tests/sync/metrics.rs | 14 | ||||
| -rw-r--r-- | tests/sync/tag_variations.rs | 14 |
9 files changed, 72 insertions, 90 deletions
diff --git a/tests/common/purgatory_helpers.rs b/tests/common/purgatory_helpers.rs index b39982e..1d06f22 100644 --- a/tests/common/purgatory_helpers.rs +++ b/tests/common/purgatory_helpers.rs | |||
| @@ -16,11 +16,9 @@ use std::path::Path; | |||
| 16 | use std::process::Command; | 16 | use std::process::Command; |
| 17 | use std::time::Duration; | 17 | use std::time::Duration; |
| 18 | 18 | ||
| 19 | /// NIP-34 Repository State (kind 30618) | 19 | // NOTE: Using rust-nostr Kind variants: |
| 20 | pub const KIND_STATE: u16 = 30618; | 20 | // - Kind::RepoState.as_u16() -> Kind::RepoState (30618) |
| 21 | 21 | // - Kind::GitPullRequest.as_u16() -> Kind::GitPullRequest (1618) | |
| 22 | /// NIP-34 Pull Request (kind 1618) | ||
| 23 | pub const KIND_PR: u16 = 1618; | ||
| 24 | 22 | ||
| 25 | /// Commit variants for deterministic test commits | 23 | /// Commit variants for deterministic test commits |
| 26 | #[derive(Debug, Clone, Copy)] | 24 | #[derive(Debug, Clone, Copy)] |
| @@ -236,7 +234,7 @@ pub fn create_state_event( | |||
| 236 | )); | 234 | )); |
| 237 | } | 235 | } |
| 238 | 236 | ||
| 239 | EventBuilder::new(Kind::Custom(KIND_STATE), "") | 237 | EventBuilder::new(Kind::RepoState, "") |
| 240 | .tags(event_tags) | 238 | .tags(event_tags) |
| 241 | .sign_with_keys(keys) | 239 | .sign_with_keys(keys) |
| 242 | .map_err(|e| format!("Failed to sign state event: {}", e)) | 240 | .map_err(|e| format!("Failed to sign state event: {}", e)) |
| @@ -269,7 +267,7 @@ pub fn create_pr_event( | |||
| 269 | Tag::custom(TagKind::custom("c"), vec![commit_hash.to_string()]), | 267 | Tag::custom(TagKind::custom("c"), vec![commit_hash.to_string()]), |
| 270 | ]; | 268 | ]; |
| 271 | 269 | ||
| 272 | EventBuilder::new(Kind::Custom(KIND_PR), title) | 270 | EventBuilder::new(Kind::GitPullRequest, title) |
| 273 | .tags(tags) | 271 | .tags(tags) |
| 274 | .sign_with_keys(keys) | 272 | .sign_with_keys(keys) |
| 275 | .map_err(|e| format!("Failed to sign PR event: {}", e)) | 273 | .map_err(|e| format!("Failed to sign PR event: {}", e)) |
| @@ -323,7 +321,7 @@ pub fn create_pr_event_with_clone( | |||
| 323 | tags.push(Tag::custom(TagKind::Clone, urls)); | 321 | tags.push(Tag::custom(TagKind::Clone, urls)); |
| 324 | } | 322 | } |
| 325 | 323 | ||
| 326 | EventBuilder::new(Kind::Custom(KIND_PR), title) | 324 | EventBuilder::new(Kind::GitPullRequest, title) |
| 327 | .tags(tags) | 325 | .tags(tags) |
| 328 | .sign_with_keys(keys) | 326 | .sign_with_keys(keys) |
| 329 | .map_err(|e| format!("Failed to sign PR event: {}", e)) | 327 | .map_err(|e| format!("Failed to sign PR event: {}", e)) |
| @@ -705,7 +703,7 @@ mod tests { | |||
| 705 | ) | 703 | ) |
| 706 | .expect("Failed to create state event"); | 704 | .expect("Failed to create state event"); |
| 707 | 705 | ||
| 708 | assert_eq!(event.kind.as_u16(), KIND_STATE); | 706 | assert_eq!(event.kind.as_u16(), Kind::RepoState.as_u16()); |
| 709 | 707 | ||
| 710 | // Check d-tag | 708 | // Check d-tag |
| 711 | let has_d_tag = event.tags.iter().any(|tag| { | 709 | let has_d_tag = event.tags.iter().any(|tag| { |
| @@ -747,7 +745,7 @@ mod tests { | |||
| 747 | let event = create_pr_event(&keys, &repo_coord, "def456abc123", "Test PR") | 745 | let event = create_pr_event(&keys, &repo_coord, "def456abc123", "Test PR") |
| 748 | .expect("Failed to create PR event"); | 746 | .expect("Failed to create PR event"); |
| 749 | 747 | ||
| 750 | assert_eq!(event.kind.as_u16(), KIND_PR); | 748 | assert_eq!(event.kind.as_u16(), Kind::GitPullRequest.as_u16()); |
| 751 | 749 | ||
| 752 | // Check a-tag | 750 | // Check a-tag |
| 753 | let has_a_tag = event.tags.iter().any(|tag| { | 751 | let has_a_tag = event.tags.iter().any(|tag| { |
| @@ -815,7 +813,7 @@ mod tests { | |||
| 815 | ) | 813 | ) |
| 816 | .expect("Failed to create PR event with clone"); | 814 | .expect("Failed to create PR event with clone"); |
| 817 | 815 | ||
| 818 | assert_eq!(event.kind.as_u16(), KIND_PR); | 816 | assert_eq!(event.kind.as_u16(), Kind::GitPullRequest.as_u16()); |
| 819 | 817 | ||
| 820 | // Check a-tag | 818 | // Check a-tag |
| 821 | let has_a_tag = event.tags.iter().any(|tag| { | 819 | let has_a_tag = event.tags.iter().any(|tag| { |
diff --git a/tests/common/sync_helpers.rs b/tests/common/sync_helpers.rs index acf8c87..27422e9 100644 --- a/tests/common/sync_helpers.rs +++ b/tests/common/sync_helpers.rs | |||
| @@ -17,14 +17,10 @@ use nostr_sdk::prelude::*; | |||
| 17 | 17 | ||
| 18 | use super::relay::TestRelay; | 18 | use super::relay::TestRelay; |
| 19 | 19 | ||
| 20 | /// Kind 1618 - Issue (NIP-34 git-related event) | 20 | // NOTE: Using rust-nostr Kind variants: |
| 21 | pub const KIND_ISSUE: u16 = 1621; | 21 | // - Kind::GitIssue.as_u16() -> Kind::GitIssue (1621) |
| 22 | 22 | // - Kind::Comment.as_u16() -> Kind::Comment (1111) | |
| 23 | /// Kind 1111 - NIP-22 Comment | 23 | // - Kind::GitRepoAnnouncement.as_u16() -> Kind::GitRepoAnnouncement (30617) |
| 24 | pub const KIND_COMMENT: u16 = 1111; | ||
| 25 | |||
| 26 | /// Kind 30617 - Repository state/announcement (NIP-34) | ||
| 27 | pub const KIND_REPOSITORY_STATE: u16 = 30617; | ||
| 28 | 24 | ||
| 29 | /// Test client with built-in retry logic for connect and send operations. | 25 | /// Test client with built-in retry logic for connect and send operations. |
| 30 | /// | 26 | /// |
| @@ -225,7 +221,7 @@ fn build_layer2_issue_with_tag( | |||
| 225 | 221 | ||
| 226 | let tags = vec![tag]; | 222 | let tags = vec![tag]; |
| 227 | 223 | ||
| 228 | EventBuilder::new(Kind::Custom(KIND_ISSUE), title) | 224 | EventBuilder::new(Kind::GitIssue, title) |
| 229 | .tags(tags) | 225 | .tags(tags) |
| 230 | .sign_with_keys(keys) | 226 | .sign_with_keys(keys) |
| 231 | .map_err(|e| format!("Failed to sign Layer 2 issue event: {}", e)) | 227 | .map_err(|e| format!("Failed to sign Layer 2 issue event: {}", e)) |
| @@ -240,7 +236,7 @@ fn build_layer2_issue_with_tag( | |||
| 240 | /// * `keys` - Keys for signing the event | 236 | /// * `keys` - Keys for signing the event |
| 241 | /// * `parent_event_id` - Event ID being referenced (e.g., an issue or patch) | 237 | /// * `parent_event_id` - Event ID being referenced (e.g., an issue or patch) |
| 242 | /// * `content` - Comment content | 238 | /// * `content` - Comment content |
| 243 | /// * `kind` - Event kind (Kind::Custom(1) for reply, Kind::Custom(1111) for NIP-22 comment) | 239 | /// * `kind` - Event kind (Kind::TextNote for reply, Kind::Comment for NIP-22 comment) |
| 244 | /// | 240 | /// |
| 245 | /// # Tag Types | 241 | /// # Tag Types |
| 246 | /// - For kind 1111: Uses uppercase 'E' tag (NIP-22 style) | 242 | /// - For kind 1111: Uses uppercase 'E' tag (NIP-22 style) |
| @@ -258,7 +254,7 @@ pub fn build_layer3_comment_event( | |||
| 258 | let kind_num = kind.as_u16(); | 254 | let kind_num = kind.as_u16(); |
| 259 | 255 | ||
| 260 | // Choose tag based on kind (NIP-22 uses E, NIP-10 style uses e) | 256 | // Choose tag based on kind (NIP-22 uses E, NIP-10 style uses e) |
| 261 | let tag = if kind_num == KIND_COMMENT { | 257 | let tag = if kind_num == Kind::Comment.as_u16() { |
| 262 | // NIP-22 comment: uppercase 'E' tag | 258 | // NIP-22 comment: uppercase 'E' tag |
| 263 | Tag::custom(TagKind::custom("E"), vec![parent_event_id.to_hex()]) | 259 | Tag::custom(TagKind::custom("E"), vec![parent_event_id.to_hex()]) |
| 264 | } else { | 260 | } else { |
| @@ -302,7 +298,7 @@ pub fn build_layer3_comment_with_uppercase_e_tag( | |||
| 302 | ) -> Result<Event, String> { | 298 | ) -> Result<Event, String> { |
| 303 | let tag = Tag::custom(TagKind::custom("E"), vec![parent_event_id.to_hex()]); | 299 | let tag = Tag::custom(TagKind::custom("E"), vec![parent_event_id.to_hex()]); |
| 304 | 300 | ||
| 305 | EventBuilder::new(Kind::Custom(KIND_COMMENT), content) | 301 | EventBuilder::new(Kind::Comment, content) |
| 306 | .tags(vec![tag]) | 302 | .tags(vec![tag]) |
| 307 | .sign_with_keys(keys) | 303 | .sign_with_keys(keys) |
| 308 | .map_err(|e| format!("Failed to sign Layer 3 comment event: {}", e)) | 304 | .map_err(|e| format!("Failed to sign Layer 3 comment event: {}", e)) |
| @@ -362,7 +358,7 @@ pub fn create_repo_announcement(keys: &Keys, domains: &[&str], identifier: &str) | |||
| 362 | Tag::custom(TagKind::custom("relays"), relay_urls), | 358 | Tag::custom(TagKind::custom("relays"), relay_urls), |
| 363 | ]; | 359 | ]; |
| 364 | 360 | ||
| 365 | EventBuilder::new(Kind::Custom(KIND_REPOSITORY_STATE), "Repository state") | 361 | EventBuilder::new(Kind::GitRepoAnnouncement, "Repository state") |
| 366 | .tags(tags) | 362 | .tags(tags) |
| 367 | .sign_with_keys(keys) | 363 | .sign_with_keys(keys) |
| 368 | .expect("Failed to sign repo announcement") | 364 | .expect("Failed to sign repo announcement") |
| @@ -503,7 +499,7 @@ fn check_sync_connections_in_metrics(metrics: &str, expected: usize) -> bool { | |||
| 503 | /// # Example | 499 | /// # Example |
| 504 | /// ```ignore | 500 | /// ```ignore |
| 505 | /// let filter = Filter::new() | 501 | /// let filter = Filter::new() |
| 506 | /// .kind(Kind::Custom(1618)) | 502 | /// .kind(Kind::GitPullRequest) |
| 507 | /// .author(keys.public_key()) | 503 | /// .author(keys.public_key()) |
| 508 | /// .id(event.id); | 504 | /// .id(event.id); |
| 509 | /// | 505 | /// |
| @@ -559,7 +555,7 @@ pub async fn wait_for_event_on_relay(relay_url: &str, filter: Filter, timeout: D | |||
| 559 | pub fn repo_coord(keys: &Keys, identifier: &str) -> String { | 555 | pub fn repo_coord(keys: &Keys, identifier: &str) -> String { |
| 560 | format!( | 556 | format!( |
| 561 | "{}:{}:{}", | 557 | "{}:{}:{}", |
| 562 | KIND_REPOSITORY_STATE, | 558 | Kind::GitRepoAnnouncement.as_u16(), |
| 563 | keys.public_key().to_hex(), | 559 | keys.public_key().to_hex(), |
| 564 | identifier | 560 | identifier |
| 565 | ) | 561 | ) |
| @@ -897,7 +893,7 @@ mod tests { | |||
| 897 | build_layer2_issue_event(&keys, &coord, "Test Issue").expect("Should create event"); | 893 | build_layer2_issue_event(&keys, &coord, "Test Issue").expect("Should create event"); |
| 898 | 894 | ||
| 899 | // nostr-sdk 0.43: use field access | 895 | // nostr-sdk 0.43: use field access |
| 900 | assert_eq!(event.kind.as_u16(), KIND_ISSUE); | 896 | assert_eq!(event.kind.as_u16(), Kind::GitIssue.as_u16()); |
| 901 | 897 | ||
| 902 | // Check the tag exists | 898 | // Check the tag exists |
| 903 | let has_a_tag = event.tags.iter().any(|tag| { | 899 | let has_a_tag = event.tags.iter().any(|tag| { |
| @@ -942,15 +938,10 @@ mod tests { | |||
| 942 | let keys = Keys::generate(); | 938 | let keys = Keys::generate(); |
| 943 | let parent_id = EventId::all_zeros(); | 939 | let parent_id = EventId::all_zeros(); |
| 944 | 940 | ||
| 945 | let event = build_layer3_comment_event( | 941 | let event = build_layer3_comment_event(&keys, &parent_id, "Test comment", Kind::Comment) |
| 946 | &keys, | 942 | .expect("Should create event"); |
| 947 | &parent_id, | ||
| 948 | "Test comment", | ||
| 949 | Kind::Custom(KIND_COMMENT), | ||
| 950 | ) | ||
| 951 | .expect("Should create event"); | ||
| 952 | 943 | ||
| 953 | assert_eq!(event.kind.as_u16(), KIND_COMMENT); | 944 | assert_eq!(event.kind.as_u16(), Kind::Comment.as_u16()); |
| 954 | 945 | ||
| 955 | // NIP-22 comment should have uppercase 'E' tag | 946 | // NIP-22 comment should have uppercase 'E' tag |
| 956 | let has_e_tag = event.tags.iter().any(|tag| { | 947 | let has_e_tag = event.tags.iter().any(|tag| { |
| @@ -1003,7 +994,7 @@ mod tests { | |||
| 1003 | let event = build_layer3_comment_with_uppercase_e_tag(&keys, &parent_id, "Comment content") | 994 | let event = build_layer3_comment_with_uppercase_e_tag(&keys, &parent_id, "Comment content") |
| 1004 | .expect("Should create event"); | 995 | .expect("Should create event"); |
| 1005 | 996 | ||
| 1006 | assert_eq!(event.kind.as_u16(), KIND_COMMENT); | 997 | assert_eq!(event.kind.as_u16(), Kind::Comment.as_u16()); |
| 1007 | 998 | ||
| 1008 | let has_upper_e_tag = event.tags.iter().any(|tag| { | 999 | let has_upper_e_tag = event.tags.iter().any(|tag| { |
| 1009 | let slice = tag.as_slice(); | 1000 | let slice = tag.as_slice(); |
| @@ -1123,7 +1114,7 @@ async fn send_to_relay(relay: &TestRelay, event: &Event) -> Result<(), String> { | |||
| 1123 | /// // Assert issue synced to result.syncing_relay | 1114 | /// // Assert issue synced to result.syncing_relay |
| 1124 | /// | 1115 | /// |
| 1125 | /// // Live sync test | 1116 | /// // Live sync test |
| 1126 | /// let comment = build_layer3_comment_event(&keys, &issue.id, "Live Comment", Kind::Custom(1111))?; | 1117 | /// let comment = build_layer3_comment_event(&keys, &issue.id, "Live Comment", Kind::Comment)?; |
| 1127 | /// let result = run_sync_test(&[], &[comment]).await; | 1118 | /// let result = run_sync_test(&[], &[comment]).await; |
| 1128 | /// // Assert comment synced to result.syncing_relay | 1119 | /// // Assert comment synced to result.syncing_relay |
| 1129 | /// ``` | 1120 | /// ``` |
diff --git a/tests/nip77_negentropy.rs b/tests/nip77_negentropy.rs index 5293754..fccfe67 100644 --- a/tests/nip77_negentropy.rs +++ b/tests/nip77_negentropy.rs | |||
| @@ -56,7 +56,7 @@ async fn test_nip77_negentropy_sync_finds_events() { | |||
| 56 | // Create a second event (issue referencing the repo) | 56 | // Create a second event (issue referencing the repo) |
| 57 | let repo_coord = format!( | 57 | let repo_coord = format!( |
| 58 | "{}:{}:{}", | 58 | "{}:{}:{}", |
| 59 | KIND_REPOSITORY_STATE, | 59 | Kind::GitRepoAnnouncement.as_u16(), |
| 60 | keys.public_key().to_hex(), | 60 | keys.public_key().to_hex(), |
| 61 | "test-repo-nip77" | 61 | "test-repo-nip77" |
| 62 | ); | 62 | ); |
| @@ -103,10 +103,9 @@ async fn test_nip77_negentropy_sync_finds_events() { | |||
| 103 | tokio::time::sleep(Duration::from_millis(500)).await; | 103 | tokio::time::sleep(Duration::from_millis(500)).await; |
| 104 | 104 | ||
| 105 | // 6. Perform negentropy sync with filter matching our events | 105 | // 6. Perform negentropy sync with filter matching our events |
| 106 | let filter = Filter::new().author(keys.public_key()).kinds(vec![ | 106 | let filter = Filter::new() |
| 107 | Kind::Custom(KIND_REPOSITORY_STATE), | 107 | .author(keys.public_key()) |
| 108 | Kind::Custom(KIND_ISSUE), | 108 | .kinds(vec![Kind::GitRepoAnnouncement, Kind::GitIssue]); |
| 109 | ]); | ||
| 110 | 109 | ||
| 111 | println!("Starting negentropy sync with filter: {:?}", filter); | 110 | println!("Starting negentropy sync with filter: {:?}", filter); |
| 112 | 111 | ||
| @@ -183,7 +182,7 @@ async fn test_nip77_negentropy_sync_empty_result() { | |||
| 183 | // 3. Sync with filter that won't match anything | 182 | // 3. Sync with filter that won't match anything |
| 184 | let filter = Filter::new() | 183 | let filter = Filter::new() |
| 185 | .author(keys.public_key()) // Random new key, no events exist | 184 | .author(keys.public_key()) // Random new key, no events exist |
| 186 | .kind(Kind::Custom(KIND_REPOSITORY_STATE)); | 185 | .kind(Kind::GitRepoAnnouncement); |
| 187 | 186 | ||
| 188 | println!("Starting negentropy sync with empty filter"); | 187 | println!("Starting negentropy sync with empty filter"); |
| 189 | 188 | ||
diff --git a/tests/purgatory_sync.rs b/tests/purgatory_sync.rs index 3f52e4c..72f3d81 100644 --- a/tests/purgatory_sync.rs +++ b/tests/purgatory_sync.rs | |||
| @@ -795,7 +795,7 @@ async fn test_pr_event_clone_tag_sync_with_partial_oid_aggregation_from_multiple | |||
| 795 | // Clone URLs: source_grasp + syncing (NOT git_server - PR commit only via PR's clone tag) | 795 | // Clone URLs: source_grasp + syncing (NOT git_server - PR commit only via PR's clone tag) |
| 796 | // Relay URLs: source_grasp + mock_relay + syncing | 796 | // Relay URLs: source_grasp + mock_relay + syncing |
| 797 | let announcement = nostr_sdk::EventBuilder::new( | 797 | let announcement = nostr_sdk::EventBuilder::new( |
| 798 | nostr_sdk::Kind::Custom(30617), | 798 | Kind::GitRepoAnnouncement, |
| 799 | "Repository for PR clone tag + partial OID test", | 799 | "Repository for PR clone tag + partial OID test", |
| 800 | ) | 800 | ) |
| 801 | .tags(vec![ | 801 | .tags(vec![ |
diff --git a/tests/sync/discovery.rs b/tests/sync/discovery.rs index 3aa6dda..8ed80b5 100644 --- a/tests/sync/discovery.rs +++ b/tests/sync/discovery.rs | |||
| @@ -14,8 +14,8 @@ use nostr_sdk::prelude::*; | |||
| 14 | 14 | ||
| 15 | use crate::common::{sync_helpers::*, TestRelay}; | 15 | use crate::common::{sync_helpers::*, TestRelay}; |
| 16 | 16 | ||
| 17 | /// Kind 1617 - Patch event (NIP-34) | 17 | // NOTE: Using rust-nostr Kind variant: |
| 18 | const KIND_PATCH: u16 = 1617; | 18 | // - Kind::GitPatch.as_u16() -> Kind::GitPatch (1617) |
| 19 | 19 | ||
| 20 | /// Create an event referencing a repository coordinate via 'a' tag. | 20 | /// Create an event referencing a repository coordinate via 'a' tag. |
| 21 | /// | 21 | /// |
| @@ -26,7 +26,7 @@ fn create_event_referencing_repo(keys: &Keys, repo_coord: &str, kind: u16, conte | |||
| 26 | vec![repo_coord.to_string()], | 26 | vec![repo_coord.to_string()], |
| 27 | )]; | 27 | )]; |
| 28 | 28 | ||
| 29 | EventBuilder::new(Kind::Custom(kind), content) | 29 | EventBuilder::new(Kind::from_u16(kind), content) |
| 30 | .tags(tags) | 30 | .tags(tags) |
| 31 | .sign_with_keys(keys) | 31 | .sign_with_keys(keys) |
| 32 | .expect("Failed to sign event") | 32 | .expect("Failed to sign event") |
| @@ -82,14 +82,18 @@ async fn test_discovers_layer3_via_layer2() { | |||
| 82 | // 5. Build the repo coordinate for the 'a' tag in the patch | 82 | // 5. Build the repo coordinate for the 'a' tag in the patch |
| 83 | let repo_coord = format!( | 83 | let repo_coord = format!( |
| 84 | "{}:{}:{}", | 84 | "{}:{}:{}", |
| 85 | KIND_REPOSITORY_STATE, | 85 | Kind::GitRepoAnnouncement.as_u16(), |
| 86 | keys.public_key().to_hex(), | 86 | keys.public_key().to_hex(), |
| 87 | "test-repo-discovery" | 87 | "test-repo-discovery" |
| 88 | ); | 88 | ); |
| 89 | 89 | ||
| 90 | // 6. Create a patch event (Layer 2) that references the announcement | 90 | // 6. Create a patch event (Layer 2) that references the announcement |
| 91 | let patch = | 91 | let patch = create_event_referencing_repo( |
| 92 | create_event_referencing_repo(&keys, &repo_coord, KIND_PATCH, "Test patch proposal"); | 92 | &keys, |
| 93 | &repo_coord, | ||
| 94 | Kind::GitPatch.as_u16(), | ||
| 95 | "Test patch proposal", | ||
| 96 | ); | ||
| 93 | let patch_id = patch.id; | 97 | let patch_id = patch.id; |
| 94 | 98 | ||
| 95 | println!("Created patch {} (kind {})", patch_id, patch.kind.as_u16()); | 99 | println!("Created patch {} (kind {})", patch_id, patch.kind.as_u16()); |
| @@ -134,9 +138,7 @@ async fn test_discovers_layer3_via_layer2() { | |||
| 134 | tokio::time::sleep(Duration::from_secs(3)).await; | 138 | tokio::time::sleep(Duration::from_secs(3)).await; |
| 135 | 139 | ||
| 136 | // 10. Verify patch was synced to relay_b | 140 | // 10. Verify patch was synced to relay_b |
| 137 | let filter = Filter::new() | 141 | let filter = Filter::new().kind(Kind::GitPatch).author(keys.public_key()); |
| 138 | .kind(Kind::Custom(KIND_PATCH)) | ||
| 139 | .author(keys.public_key()); | ||
| 140 | 142 | ||
| 141 | let patch_synced = wait_for_event_on_relay(relay_b.url(), filter, Duration::from_secs(5)).await; | 143 | let patch_synced = wait_for_event_on_relay(relay_b.url(), filter, Duration::from_secs(5)).await; |
| 142 | 144 | ||
| @@ -250,9 +252,7 @@ async fn test_relay_discovery_via_announcements_with_historic_sync() { | |||
| 250 | tokio::time::sleep(Duration::from_secs(3)).await; | 252 | tokio::time::sleep(Duration::from_secs(3)).await; |
| 251 | 253 | ||
| 252 | // 8. Verify Layer 2 event synced to relay_b | 254 | // 8. Verify Layer 2 event synced to relay_b |
| 253 | let issue_filter = Filter::new() | 255 | let issue_filter = Filter::new().kind(Kind::GitIssue).author(keys.public_key()); |
| 254 | .kind(Kind::Custom(KIND_ISSUE)) | ||
| 255 | .author(keys.public_key()); | ||
| 256 | let issue_synced = | 256 | let issue_synced = |
| 257 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; | 257 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; |
| 258 | 258 | ||
| @@ -389,7 +389,7 @@ async fn test_recursive_relay_discovery_via_announcements_with_historic_sync() { | |||
| 389 | 389 | ||
| 390 | // 8. Verify announcement_x was synced to relay_a (from bootstrap relay_b) | 390 | // 8. Verify announcement_x was synced to relay_a (from bootstrap relay_b) |
| 391 | let filter_x = Filter::new() | 391 | let filter_x = Filter::new() |
| 392 | .kind(Kind::Custom(KIND_REPOSITORY_STATE)) | 392 | .kind(Kind::GitRepoAnnouncement) |
| 393 | .author(keys_x.public_key()); | 393 | .author(keys_x.public_key()); |
| 394 | 394 | ||
| 395 | let announcement_x_synced = | 395 | let announcement_x_synced = |
| @@ -402,7 +402,7 @@ async fn test_recursive_relay_discovery_via_announcements_with_historic_sync() { | |||
| 402 | 402 | ||
| 403 | // 9. Verify announcement_y was synced to relay_a (from discovered relay_c) | 403 | // 9. Verify announcement_y was synced to relay_a (from discovered relay_c) |
| 404 | let filter_y = Filter::new() | 404 | let filter_y = Filter::new() |
| 405 | .kind(Kind::Custom(KIND_REPOSITORY_STATE)) | 405 | .kind(Kind::GitRepoAnnouncement) |
| 406 | .author(keys_y.public_key()); | 406 | .author(keys_y.public_key()); |
| 407 | 407 | ||
| 408 | let announcement_y_synced = | 408 | let announcement_y_synced = |
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(); |
diff --git a/tests/sync/live_sync.rs b/tests/sync/live_sync.rs index 7fa08a0..8ee3119 100644 --- a/tests/sync/live_sync.rs +++ b/tests/sync/live_sync.rs | |||
| @@ -115,7 +115,7 @@ async fn test_live_sync_layer2_events() { | |||
| 115 | 115 | ||
| 116 | // 9. Wait and verify event syncs to relay_b | 116 | // 9. Wait and verify event syncs to relay_b |
| 117 | let filter = Filter::new() | 117 | let filter = Filter::new() |
| 118 | .kind(Kind::Custom(KIND_ISSUE)) | 118 | .kind(Kind::GitIssue) |
| 119 | .author(keys.public_key()) | 119 | .author(keys.public_key()) |
| 120 | .id(issue_id); | 120 | .id(issue_id); |
| 121 | 121 | ||
| @@ -237,7 +237,7 @@ async fn test_live_sync_layer3_events() { | |||
| 237 | // 6. Now wait for issue to sync to relay_b (this triggers Layer 3 filter creation) | 237 | // 6. Now wait for issue to sync to relay_b (this triggers Layer 3 filter creation) |
| 238 | tokio::time::sleep(Duration::from_secs(2)).await; | 238 | tokio::time::sleep(Duration::from_secs(2)).await; |
| 239 | 239 | ||
| 240 | let issue_filter = Filter::new().kind(Kind::Custom(KIND_ISSUE)).id(issue_id); | 240 | let issue_filter = Filter::new().kind(Kind::GitIssue).id(issue_id); |
| 241 | let issue_synced = | 241 | let issue_synced = |
| 242 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(3)).await; | 242 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(3)).await; |
| 243 | println!("Issue synced to relay_b: {}", issue_synced); | 243 | println!("Issue synced to relay_b: {}", issue_synced); |
| @@ -247,7 +247,7 @@ async fn test_live_sync_layer3_events() { | |||
| 247 | 247 | ||
| 248 | // 7. Wait and verify comment syncs to relay_b | 248 | // 7. Wait and verify comment syncs to relay_b |
| 249 | let comment_filter = Filter::new() | 249 | let comment_filter = Filter::new() |
| 250 | .kind(Kind::Custom(KIND_COMMENT)) | 250 | .kind(Kind::Comment) |
| 251 | .author(keys.public_key()) | 251 | .author(keys.public_key()) |
| 252 | .id(comment_id); | 252 | .id(comment_id); |
| 253 | 253 | ||
| @@ -267,9 +267,7 @@ async fn test_live_sync_layer3_events() { | |||
| 267 | client.connect().await; | 267 | client.connect().await; |
| 268 | tokio::time::sleep(Duration::from_millis(500)).await; | 268 | tokio::time::sleep(Duration::from_millis(500)).await; |
| 269 | 269 | ||
| 270 | let fetch_filter = Filter::new() | 270 | let fetch_filter = Filter::new().kind(Kind::Comment).id(comment_id); |
| 271 | .kind(Kind::Custom(KIND_COMMENT)) | ||
| 272 | .id(comment_id); | ||
| 273 | 271 | ||
| 274 | if let Ok(events) = client | 272 | if let Ok(events) = client |
| 275 | .fetch_events(fetch_filter, Duration::from_secs(2)) | 273 | .fetch_events(fetch_filter, Duration::from_secs(2)) |
| @@ -418,9 +416,7 @@ async fn test_live_sync_event_ordering() { | |||
| 418 | client.connect().await; | 416 | client.connect().await; |
| 419 | tokio::time::sleep(Duration::from_millis(500)).await; | 417 | tokio::time::sleep(Duration::from_millis(500)).await; |
| 420 | 418 | ||
| 421 | let filter = Filter::new() | 419 | let filter = Filter::new().kind(Kind::GitIssue).author(keys.public_key()); |
| 422 | .kind(Kind::Custom(KIND_ISSUE)) | ||
| 423 | .author(keys.public_key()); | ||
| 424 | 420 | ||
| 425 | match client.fetch_events(filter, Duration::from_secs(3)).await { | 421 | match client.fetch_events(filter, Duration::from_secs(3)).await { |
| 426 | Ok(events) => { | 422 | Ok(events) => { |
diff --git a/tests/sync/metrics.rs b/tests/sync/metrics.rs index 987b83a..e8c75c7 100644 --- a/tests/sync/metrics.rs +++ b/tests/sync/metrics.rs | |||
| @@ -17,7 +17,7 @@ use nostr_sdk::prelude::*; | |||
| 17 | use crate::common::{ | 17 | use crate::common::{ |
| 18 | sync_helpers::{ | 18 | sync_helpers::{ |
| 19 | create_repo_announcement, fetch_metrics, wait_for_sync_connection, MetricsTestHarness, | 19 | create_repo_announcement, fetch_metrics, wait_for_sync_connection, MetricsTestHarness, |
| 20 | ParsedMetrics, TestClient, KIND_REPOSITORY_STATE, | 20 | ParsedMetrics, TestClient, |
| 21 | }, | 21 | }, |
| 22 | TestRelay, | 22 | TestRelay, |
| 23 | }; | 23 | }; |
| @@ -175,8 +175,8 @@ async fn test_metric_values_are_numeric() { | |||
| 175 | // Phase 2: Real Metrics Tests (Using MetricsTestHarness) | 175 | // Phase 2: Real Metrics Tests (Using MetricsTestHarness) |
| 176 | // ============================================================================ | 176 | // ============================================================================ |
| 177 | 177 | ||
| 178 | /// Kind 1617 - Patch event (NIP-34) | 178 | // NOTE: Using rust-nostr Kind variant: |
| 179 | const KIND_PATCH: u16 = 1617; | 179 | // - Kind::GitPatch.as_u16() -> Kind::GitPatch (1617) |
| 180 | 180 | ||
| 181 | /// Create an event referencing a repository coordinate via 'a' tag. | 181 | /// Create an event referencing a repository coordinate via 'a' tag. |
| 182 | /// | 182 | /// |
| @@ -187,7 +187,7 @@ fn create_event_referencing_repo(keys: &Keys, repo_coord: &str, kind: u16, conte | |||
| 187 | vec![repo_coord.to_string()], | 187 | vec![repo_coord.to_string()], |
| 188 | )]; | 188 | )]; |
| 189 | 189 | ||
| 190 | EventBuilder::new(Kind::Custom(kind), content) | 190 | EventBuilder::new(Kind::from_u16(kind), content) |
| 191 | .tags(tags) | 191 | .tags(tags) |
| 192 | .sign_with_keys(keys) | 192 | .sign_with_keys(keys) |
| 193 | .expect("Failed to sign event") | 193 | .expect("Failed to sign event") |
| @@ -239,7 +239,7 @@ async fn test_startup_sync_event_count() { | |||
| 239 | // 5. Build the repo coordinate for the 'a' tag in the patches | 239 | // 5. Build the repo coordinate for the 'a' tag in the patches |
| 240 | let repo_coord = format!( | 240 | let repo_coord = format!( |
| 241 | "{}:{}:{}", | 241 | "{}:{}:{}", |
| 242 | KIND_REPOSITORY_STATE, | 242 | Kind::GitRepoAnnouncement.as_u16(), |
| 243 | keys.public_key().to_hex(), | 243 | keys.public_key().to_hex(), |
| 244 | "test-repo-metrics" | 244 | "test-repo-metrics" |
| 245 | ); | 245 | ); |
| @@ -250,7 +250,7 @@ async fn test_startup_sync_event_count() { | |||
| 250 | create_event_referencing_repo( | 250 | create_event_referencing_repo( |
| 251 | &keys, | 251 | &keys, |
| 252 | &repo_coord, | 252 | &repo_coord, |
| 253 | KIND_PATCH, | 253 | Kind::GitPatch.as_u16(), |
| 254 | &format!("Test patch {}", i), | 254 | &format!("Test patch {}", i), |
| 255 | ) | 255 | ) |
| 256 | }) | 256 | }) |
| @@ -320,7 +320,7 @@ async fn test_startup_sync_event_count() { | |||
| 320 | 320 | ||
| 321 | // 12. Verify patches actually synced (functional check) | 321 | // 12. Verify patches actually synced (functional check) |
| 322 | let filter = Filter::new() | 322 | let filter = Filter::new() |
| 323 | .kind(Kind::Custom(KIND_PATCH)) | 323 | .kind(Kind::Custom(Kind::GitPatch.as_u16())) |
| 324 | .author(keys.public_key()); | 324 | .author(keys.public_key()); |
| 325 | 325 | ||
| 326 | let patches_synced = crate::common::sync_helpers::wait_for_event_on_relay( | 326 | let patches_synced = crate::common::sync_helpers::wait_for_event_on_relay( |
diff --git a/tests/sync/tag_variations.rs b/tests/sync/tag_variations.rs index 7153104..46b1203 100644 --- a/tests/sync/tag_variations.rs +++ b/tests/sync/tag_variations.rs | |||
| @@ -110,7 +110,7 @@ async fn test_layer2_sync_with_lowercase_a_tag() { | |||
| 110 | 110 | ||
| 111 | // 5. Wait and verify event syncs to relay_b | 111 | // 5. Wait and verify event syncs to relay_b |
| 112 | let filter = Filter::new() | 112 | let filter = Filter::new() |
| 113 | .kind(Kind::Custom(KIND_ISSUE)) | 113 | .kind(Kind::GitIssue) |
| 114 | .author(keys.public_key()) | 114 | .author(keys.public_key()) |
| 115 | .id(issue_id); | 115 | .id(issue_id); |
| 116 | 116 | ||
| @@ -212,7 +212,7 @@ async fn test_layer2_sync_with_uppercase_a_tag() { | |||
| 212 | 212 | ||
| 213 | // 5. Wait and verify event syncs to relay_b | 213 | // 5. Wait and verify event syncs to relay_b |
| 214 | let filter = Filter::new() | 214 | let filter = Filter::new() |
| 215 | .kind(Kind::Custom(KIND_ISSUE)) | 215 | .kind(Kind::GitIssue) |
| 216 | .author(keys.public_key()) | 216 | .author(keys.public_key()) |
| 217 | .id(issue_id); | 217 | .id(issue_id); |
| 218 | 218 | ||
| @@ -309,7 +309,7 @@ async fn test_layer2_sync_with_q_tag() { | |||
| 309 | 309 | ||
| 310 | // 5. Wait and verify event syncs to relay_b | 310 | // 5. Wait and verify event syncs to relay_b |
| 311 | let filter = Filter::new() | 311 | let filter = Filter::new() |
| 312 | .kind(Kind::Custom(KIND_ISSUE)) | 312 | .kind(Kind::GitIssue) |
| 313 | .author(keys.public_key()) | 313 | .author(keys.public_key()) |
| 314 | .id(issue_id); | 314 | .id(issue_id); |
| 315 | 315 | ||
| @@ -403,7 +403,7 @@ async fn test_layer3_sync_with_lowercase_e_tag() { | |||
| 403 | println!("Layer 2 issue {} sent to relay_a", issue_id); | 403 | println!("Layer 2 issue {} sent to relay_a", issue_id); |
| 404 | 404 | ||
| 405 | // 5. Wait for issue to sync to relay_b | 405 | // 5. Wait for issue to sync to relay_b |
| 406 | let issue_filter = Filter::new().kind(Kind::Custom(KIND_ISSUE)).id(issue_id); | 406 | let issue_filter = Filter::new().kind(Kind::GitIssue).id(issue_id); |
| 407 | let issue_synced = | 407 | let issue_synced = |
| 408 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; | 408 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; |
| 409 | println!("Issue synced to relay_b: {}", issue_synced); | 409 | println!("Issue synced to relay_b: {}", issue_synced); |
| @@ -527,7 +527,7 @@ async fn test_layer3_sync_with_uppercase_e_tag() { | |||
| 527 | println!("Layer 2 issue {} sent to relay_a", issue_id); | 527 | println!("Layer 2 issue {} sent to relay_a", issue_id); |
| 528 | 528 | ||
| 529 | // 5. Wait for issue to sync to relay_b | 529 | // 5. Wait for issue to sync to relay_b |
| 530 | let issue_filter = Filter::new().kind(Kind::Custom(KIND_ISSUE)).id(issue_id); | 530 | let issue_filter = Filter::new().kind(Kind::GitIssue).id(issue_id); |
| 531 | let issue_synced = | 531 | let issue_synced = |
| 532 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; | 532 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; |
| 533 | println!("Issue synced to relay_b: {}", issue_synced); | 533 | println!("Issue synced to relay_b: {}", issue_synced); |
| @@ -567,7 +567,7 @@ async fn test_layer3_sync_with_uppercase_e_tag() { | |||
| 567 | 567 | ||
| 568 | // 7. Wait and verify comment syncs to relay_b | 568 | // 7. Wait and verify comment syncs to relay_b |
| 569 | let comment_filter = Filter::new() | 569 | let comment_filter = Filter::new() |
| 570 | .kind(Kind::Custom(KIND_COMMENT)) // Kind 1111 | 570 | .kind(Kind::Comment) // Kind 1111 |
| 571 | .author(keys.public_key()) | 571 | .author(keys.public_key()) |
| 572 | .id(comment_id); | 572 | .id(comment_id); |
| 573 | 573 | ||
| @@ -655,7 +655,7 @@ async fn test_layer3_sync_with_q_tag() { | |||
| 655 | println!("Layer 2 issue {} sent to relay_a", issue_id); | 655 | println!("Layer 2 issue {} sent to relay_a", issue_id); |
| 656 | 656 | ||
| 657 | // 5. Wait for issue to sync to relay_b | 657 | // 5. Wait for issue to sync to relay_b |
| 658 | let issue_filter = Filter::new().kind(Kind::Custom(KIND_ISSUE)).id(issue_id); | 658 | let issue_filter = Filter::new().kind(Kind::GitIssue).id(issue_id); |
| 659 | let issue_synced = | 659 | let issue_synced = |
| 660 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; | 660 | wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(5)).await; |
| 661 | println!("Issue synced to relay_b: {}", issue_synced); | 661 | println!("Issue synced to relay_b: {}", issue_synced); |