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/git.rs2
-rw-r--r--test_utils/src/lib.rs14
3 files changed, 12 insertions, 12 deletions
diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml
index d0442ac..baed990 100644
--- a/test_utils/Cargo.toml
+++ b/test_utils/Cargo.toml
@@ -10,10 +10,10 @@ dialoguer = "0.10.4"
10directories = "5.0.1" 10directories = "5.0.1"
11futures = "0.3.28" 11futures = "0.3.28"
12git2 = "0.19.0" 12git2 = "0.19.0"
13nostr = "0.34.1" 13nostr = "0.35.0"
14nostr-database = "0.34.0" 14nostr-database = "0.35.0"
15nostr-sdk = "0.34.0" 15nostr-sdk = "0.35.0"
16nostr-sqlite = "0.34.0" 16nostr-sqlite = "0.35.0"
17once_cell = "1.18.0" 17once_cell = "1.18.0"
18rand = "0.8" 18rand = "0.8"
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/git.rs b/test_utils/src/git.rs
index 2a3d566..3c19a2c 100644
--- a/test_utils/src/git.rs
+++ b/test_utils/src/git.rs
@@ -25,7 +25,7 @@ impl Default for GitTestRepo {
25 let repo_event = generate_repo_ref_event(); 25 let repo_event = generate_repo_ref_event();
26 let coordinate = Coordinate { 26 let coordinate = Coordinate {
27 kind: Kind::GitRepoAnnouncement, 27 kind: Kind::GitRepoAnnouncement,
28 public_key: repo_event.author(), 28 public_key: repo_event.pubkey,
29 identifier: repo_event.identifier().unwrap().to_string(), 29 identifier: repo_event.identifier().unwrap().to_string(),
30 relays: vec![ 30 relays: vec![
31 "ws://localhost:8055".to_string(), 31 "ws://localhost:8055".to_string(),
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs
index be51ed9..f329681 100644
--- a/test_utils/src/lib.rs
+++ b/test_utils/src/lib.rs
@@ -10,7 +10,7 @@ use dialoguer::theme::{ColorfulTheme, Theme};
10use futures::executor::block_on; 10use 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, Order}; 13use nostr_database::NostrDatabase;
14use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard}; 14use nostr_sdk::{serde_json, Client, NostrSigner, TagStandard};
15use nostr_sqlite::SQLiteDatabase; 15use nostr_sqlite::SQLiteDatabase;
16use once_cell::sync::Lazy; 16use once_cell::sync::Lazy;
@@ -1064,7 +1064,7 @@ pub async fn get_events_from_cache(
1064) -> Result<Vec<nostr::Event>> { 1064) -> Result<Vec<nostr::Event>> {
1065 get_local_cache_database(git_repo_path) 1065 get_local_cache_database(git_repo_path)
1066 .await? 1066 .await?
1067 .query(filters.clone(), Order::Asc) 1067 .query(filters.clone())
1068 .await 1068 .await
1069 .context( 1069 .context(
1070 "cannot execute query on opened git repo nostr cache database .git/nostr-cache.sqlite", 1070 "cannot execute query on opened git repo nostr cache database .git/nostr-cache.sqlite",
@@ -1091,10 +1091,10 @@ pub fn get_proposal_branch_name_from_events(
1091 branch_name_in_event: &str, 1091 branch_name_in_event: &str,
1092) -> Result<String> { 1092) -> Result<String> {
1093 for event in events { 1093 for event in events {
1094 if event.tags().iter().any(|t| { 1094 if event.tags.iter().any(|t| {
1095 !t.as_vec()[1].eq("revision-root") 1095 !t.as_slice()[1].eq("revision-root")
1096 && event.tags().iter().any(|t| { 1096 && event.tags.iter().any(|t| {
1097 t.as_vec()[0].eq("branch-name") && t.as_vec()[1].eq(branch_name_in_event) 1097 t.as_slice()[0].eq("branch-name") && t.as_slice()[1].eq(branch_name_in_event)
1098 }) 1098 })
1099 }) { 1099 }) {
1100 return Ok(format!( 1100 return Ok(format!(
@@ -1379,7 +1379,7 @@ fn get_first_proposal_event_id() -> Result<nostr::EventId> {
1379 .find(|e| { 1379 .find(|e| {
1380 e.tags 1380 e.tags
1381 .iter() 1381 .iter()
1382 .any(|t| t.as_vec()[1].eq(&FEATURE_BRANCH_NAME_1)) 1382 .any(|t| t.as_slice()[1].eq(&FEATURE_BRANCH_NAME_1))
1383 }) 1383 })
1384 .unwrap() 1384 .unwrap()
1385 .id; 1385 .id;