diff options
Diffstat (limited to 'test_utils/src/lib.rs')
| -rw-r--r-- | test_utils/src/lib.rs | 11 |
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; | |||
| 11 | use git::GitTestRepo; | 11 | use git::GitTestRepo; |
| 12 | use nostr::{self, nips::nip65::RelayMetadata, Kind, Tag}; | 12 | use nostr::{self, nips::nip65::RelayMetadata, Kind, Tag}; |
| 13 | use nostr_database::NostrDatabase; | 13 | use nostr_database::NostrDatabase; |
| 14 | use nostr_lmdb::NostrLMDB; | ||
| 14 | use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard}; | 15 | use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard}; |
| 15 | use nostr_sqlite::SQLiteDatabase; | ||
| 16 | use once_cell::sync::Lazy; | 16 | use once_cell::sync::Lazy; |
| 17 | use rexpect::session::{Options, PtySession}; | 17 | use rexpect::session::{Options, PtySession}; |
| 18 | use strip_ansi_escapes::strip_str; | 18 | use strip_ansi_escapes::strip_str; |
| @@ -1051,10 +1051,9 @@ where | |||
| 1051 | } | 1051 | } |
| 1052 | 1052 | ||
| 1053 | /** copied from client.rs */ | 1053 | /** copied from client.rs */ |
| 1054 | async fn get_local_cache_database(git_repo_path: &Path) -> Result<SQLiteDatabase> { | 1054 | async 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 | ||