upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/common/sync_helpers.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 15:39:41 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 15:39:41 +0000
commit7dcbc84806e7b3000835eb9132dfc4e9003e382a (patch)
treebc25be8495d81adcc9b5d4528c5ddd9fd02db772 /tests/common/sync_helpers.rs
parent3de0156b2a974408643c1dc6287595ba998b5afd (diff)
fix: include npub in clone URLs generated by create_repo_announcement
The clone URL format should be http://{domain}/{npub}/{identifier}.git but was missing the npub segment. This caused git push authorization to fail because the URL didn't match the expected repository path.
Diffstat (limited to 'tests/common/sync_helpers.rs')
-rw-r--r--tests/common/sync_helpers.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/common/sync_helpers.rs b/tests/common/sync_helpers.rs
index 910baae..acf8c87 100644
--- a/tests/common/sync_helpers.rs
+++ b/tests/common/sync_helpers.rs
@@ -340,10 +340,16 @@ pub fn build_layer3_quote_with_q_tag(
340/// # Returns 340/// # Returns
341/// A signed repository announcement event ready to send. 341/// A signed repository announcement event ready to send.
342pub fn create_repo_announcement(keys: &Keys, domains: &[&str], identifier: &str) -> Event { 342pub fn create_repo_announcement(keys: &Keys, domains: &[&str], identifier: &str) -> Event {
343 // Build clone URLs for all domains (with .git suffix) 343 // Get npub for the clone URL path (format: /<npub>/<identifier>.git)
344 let npub = keys
345 .public_key()
346 .to_bech32()
347 .expect("Failed to convert public key to npub");
348
349 // Build clone URLs for all domains (with npub and .git suffix)
344 let clone_urls: Vec<String> = domains 350 let clone_urls: Vec<String> = domains
345 .iter() 351 .iter()
346 .map(|d| format!("http://{}/{}.git", d, identifier)) 352 .map(|d| format!("http://{}/{}/{}.git", d, npub, identifier))
347 .collect(); 353 .collect();
348 354
349 // Build relay URLs for all domains 355 // Build relay URLs for all domains