upleb.uk

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

summaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/Cargo.toml8
-rw-r--r--test_utils/src/lib.rs2
-rw-r--r--test_utils/src/relay.rs8
3 files changed, 11 insertions, 7 deletions
diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml
index 8602416..236ba80 100644
--- a/test_utils/Cargo.toml
+++ b/test_utils/Cargo.toml
@@ -10,10 +10,10 @@ dialoguer = "0.11.0"
10directories = "6.0.0" 10directories = "6.0.0"
11futures = "0.3.31" 11futures = "0.3.31"
12git2 = "0.20.2" 12git2 = "0.20.2"
13nostr = "0.42.2" 13nostr = "0.43.0"
14nostr-database = "0.42.0" 14nostr-database = "0.43.0"
15nostr-lmdb = "0.42.0" 15nostr-lmdb = "0.43.0"
16nostr-sdk = "0.42.0" 16nostr-sdk = "0.43.0"
17once_cell = "1.21.3" 17once_cell = "1.21.3"
18rand = "0.9" 18rand = "0.9"
19rexpect = { git = "https://github.com/rust-cli/rexpect.git", rev = "9eb61dd" } 19rexpect = { git = "https://github.com/rust-cli/rexpect.git", rev = "9eb61dd" }
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs
index 7d79cff..3ae004f 100644
--- a/test_utils/src/lib.rs
+++ b/test_utils/src/lib.rs
@@ -13,7 +13,7 @@ use futures::{executor::block_on, future::join_all};
13use git::GitTestRepo; 13use git::GitTestRepo;
14use git2::{Signature, Time}; 14use git2::{Signature, Time};
15use nostr::{self, Kind, Tag, nips::nip65::RelayMetadata}; 15use nostr::{self, Kind, Tag, nips::nip65::RelayMetadata};
16use nostr_database::NostrEventsDatabase; 16use nostr_database::NostrDatabase;
17use nostr_lmdb::NostrLMDB; 17use nostr_lmdb::NostrLMDB;
18use nostr_sdk::{Client, Event, NostrSigner, TagStandard, serde_json}; 18use nostr_sdk::{Client, Event, NostrSigner, TagStandard, serde_json};
19use once_cell::sync::Lazy; 19use once_cell::sync::Lazy;
diff --git a/test_utils/src/relay.rs b/test_utils/src/relay.rs
index b14f532..8a982a4 100644
--- a/test_utils/src/relay.rs
+++ b/test_utils/src/relay.rs
@@ -1,7 +1,7 @@
1use std::collections::HashMap; 1use std::collections::HashMap;
2 2
3use anyhow::{Result, bail}; 3use anyhow::{Result, bail};
4use nostr::{ClientMessage, JsonUtil, RelayMessage}; 4use nostr::{ClientMessage, JsonUtil, RelayMessage, filter::MatchEventOptions};
5 5
6use crate::CliTester; 6use crate::CliTester;
7 7
@@ -105,7 +105,11 @@ impl<'a> Relay<'a> {
105 &self 105 &self
106 .events 106 .events
107 .iter() 107 .iter()
108 .filter(|e| filters.iter().any(|filter| filter.match_event(e))) 108 .filter(|e| {
109 filters
110 .iter()
111 .any(|filter| filter.match_event(e, MatchEventOptions::default()))
112 })
109 .filter(|_| true) 113 .filter(|_| true)
110 .cloned() 114 .cloned()
111 .collect(), 115 .collect(),