From 83448a99aaf18c7a045a081c5de0c22bc4a83de1 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 27 Nov 2024 17:08:25 +0000 Subject: chore: bump rust-nosrt v0.37.0 use RelayUrl in repo_ref which I had resisted as it mutates relay urls when printed to append a slash --- tests/git_remote_nostr/main.rs | 6 +++--- tests/ngit_list.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/git_remote_nostr/main.rs b/tests/git_remote_nostr/main.rs index 84e66bd..5a1d416 100644 --- a/tests/git_remote_nostr/main.rs +++ b/tests/git_remote_nostr/main.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use futures::join; use git2::Oid; use nostr::nips::nip01::Coordinate; -use nostr_sdk::{secp256k1::rand, Event, JsonUtil, Kind, ToBech32}; +use nostr_sdk::{secp256k1::rand, Event, JsonUtil, Kind, RelayUrl, ToBech32}; use relay::Relay; use serial_test::serial; use test_utils::{git::GitTestRepo, *}; @@ -23,8 +23,8 @@ fn get_nostr_remote_url() -> Result { public_key: repo_event.pubkey, identifier: repo_event.tags.identifier().unwrap().to_string(), relays: vec![ - "ws://localhost:8055".to_string(), - "ws://localhost:8056".to_string(), + RelayUrl::parse("ws://localhost:8055").unwrap(), + RelayUrl::parse("ws://localhost:8056").unwrap(), ], } .to_bech32()?; diff --git a/tests/ngit_list.rs b/tests/ngit_list.rs index a6b1374..ab6ba22 100644 --- a/tests/ngit_list.rs +++ b/tests/ngit_list.rs @@ -50,6 +50,7 @@ mod cannot_find_repo_event { use super::*; mod cli_prompts { use nostr::{nips::nip01::Coordinate, ToBech32}; + use nostr_sdk::RelayUrl; use super::*; async fn run_async_repo_event_ref_needed(invalid_input: bool, naddr: bool) -> Result<()> { @@ -91,7 +92,7 @@ mod cannot_find_repo_event { kind: nostr::Kind::GitRepoAnnouncement, public_key: TEST_KEY_1_KEYS.public_key(), identifier: repo_event.tags.identifier().unwrap().to_string(), - relays: vec!["ws://localhost:8056".to_string()], + relays: vec![RelayUrl::parse("ws://localhost:8056").unwrap()], } .to_bech32()?, )?; -- cgit v1.2.3