upleb.uk

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

summaryrefslogtreecommitdiff
path: root/test_utils/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils/src/lib.rs')
-rw-r--r--test_utils/src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs
index 48273e8..89cbaa9 100644
--- a/test_utils/src/lib.rs
+++ b/test_utils/src/lib.rs
@@ -1208,8 +1208,12 @@ where
1208 1208
1209/** copied from client.rs */ 1209/** copied from client.rs */
1210async fn get_local_cache_database(git_repo_path: &Path) -> Result<NostrLMDB> { 1210async fn get_local_cache_database(git_repo_path: &Path) -> Result<NostrLMDB> {
1211 NostrLMDB::open(git_repo_path.join(".git/nostr-cache.lmdb")) 1211 let git_dir = git2::Repository::discover(git_repo_path)
1212 .context("failed to open or create nostr cache database at .git/nostr-cache.lmdb") 1212 .context("failed to discover git repository")?
1213 .commondir()
1214 .to_path_buf();
1215 NostrLMDB::open(git_dir.join("nostr-cache.lmdb"))
1216 .context("failed to open or create nostr cache database at <git-dir>/nostr-cache.lmdb")
1213} 1217}
1214 1218
1215/** copied from client.rs */ 1219/** copied from client.rs */