upleb.uk

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

summaryrefslogtreecommitdiff
path: root/test_utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils/src')
-rw-r--r--test_utils/src/lib.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs
index f329681..57b0643 100644
--- a/test_utils/src/lib.rs
+++ b/test_utils/src/lib.rs
@@ -11,8 +11,8 @@ use futures::executor::block_on;
11use git::GitTestRepo; 11use git::GitTestRepo;
12use nostr::{self, nips::nip65::RelayMetadata, Kind, Tag}; 12use nostr::{self, nips::nip65::RelayMetadata, Kind, Tag};
13use nostr_database::NostrDatabase; 13use nostr_database::NostrDatabase;
14use nostr_lmdb::NostrLMDB;
14use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard}; 15use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard};
15use nostr_sqlite::SQLiteDatabase;
16use once_cell::sync::Lazy; 16use once_cell::sync::Lazy;
17use rexpect::session::{Options, PtySession}; 17use rexpect::session::{Options, PtySession};
18use strip_ansi_escapes::strip_str; 18use strip_ansi_escapes::strip_str;
@@ -1051,10 +1051,9 @@ where
1051} 1051}
1052 1052
1053/** copied from client.rs */ 1053/** copied from client.rs */
1054async fn get_local_cache_database(git_repo_path: &Path) -> Result<SQLiteDatabase> { 1054async fn get_local_cache_database(git_repo_path: &Path) -> Result<NostrLMDB> {
1055 SQLiteDatabase::open(git_repo_path.join(".git/nostr-cache.sqlite")) 1055 NostrLMDB::open(git_repo_path.join(".git/nostr-cache.lmdb"))
1056 .await 1056 .context("cannot open or create nostr cache database at .git/nostr-cache.lmdb")
1057 .context("cannot open or create nostr cache database at .git/nostr-cache.sqlite")
1058} 1057}
1059 1058
1060/** copied from client.rs */ 1059/** copied from client.rs */
@@ -1067,7 +1066,7 @@ pub async fn get_events_from_cache(
1067 .query(filters.clone()) 1066 .query(filters.clone())
1068 .await 1067 .await
1069 .context( 1068 .context(
1070 "cannot execute query on opened git repo nostr cache database .git/nostr-cache.sqlite", 1069 "cannot execute query on opened git repo nostr cache database .git/nostr-cache.lmdb",
1071 ) 1070 )
1072} 1071}
1073 1072