upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/ngit_init.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-05-22 16:20:25 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-05-22 17:09:47 +0100
commit4dc5d0c9fb170981cf4fade5558d7cc8da404aa3 (patch)
tree9f87365d5c479831a0fe7bb2db60a4440c166639 /tests/ngit_init.rs
parentb6a161e1107d836d410d225d6700eeab38f12023 (diff)
feat(init): overhaul & simplify with ngit-relays
introduce ngit-relays as a way of setting git servers and relays at the same time using a standard for specific repo locations: https://<domain-port-path>/<npub>/<identifer>.git add simple and advanced modes. prompt less. eg always set remote origin to nostr url. automatically push main or master branch.
Diffstat (limited to 'tests/ngit_init.rs')
-rw-r--r--tests/ngit_init.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/ngit_init.rs b/tests/ngit_init.rs
index 409bd51..70a3f57 100644
--- a/tests/ngit_init.rs
+++ b/tests/ngit_init.rs
@@ -11,15 +11,6 @@ fn expect_msgs_first(p: &mut CliTester) -> Result<()> {
11 Ok(()) 11 Ok(())
12} 12}
13 13
14fn expect_prompt_to_set_origin(p: &mut CliTester) -> Result<()> {
15 p.expect_confirm_eventually(
16 "set remote \"origin\" to the nostr url of your repository?",
17 Some(true),
18 )?
19 .succeeds_with(Some(false))?;
20 Ok(())
21}
22
23fn get_cli_args() -> Vec<&'static str> { 14fn get_cli_args() -> Vec<&'static str> {
24 vec![ 15 vec![
25 "--nsec", 16 "--nsec",
@@ -101,7 +92,6 @@ mod when_repo_not_previously_claimed {
101 // // check relay had the right number of events 92 // // check relay had the right number of events
102 let cli_tester_handle = std::thread::spawn(move || -> Result<()> { 93 let cli_tester_handle = std::thread::spawn(move || -> Result<()> {
103 let mut p = cli_tester_init(&git_repo); 94 let mut p = cli_tester_init(&git_repo);
104 expect_prompt_to_set_origin(&mut p)?;
105 p.expect_end_eventually()?; 95 p.expect_end_eventually()?;
106 for p in [51, 52, 53, 55, 56, 57] { 96 for p in [51, 52, 53, 55, 56, 57] {
107 relay::shutdown_relay(8000 + p)?; 97 relay::shutdown_relay(8000 + p)?;
@@ -224,7 +214,6 @@ mod when_repo_not_previously_claimed {
224 // // check relay had the right number of events 214 // // check relay had the right number of events
225 let cli_tester_handle = std::thread::spawn(move || -> Result<()> { 215 let cli_tester_handle = std::thread::spawn(move || -> Result<()> {
226 let mut p = cli_tester_init(&git_repo); 216 let mut p = cli_tester_init(&git_repo);
227 expect_prompt_to_set_origin(&mut p)?;
228 p.expect_end_eventually()?; 217 p.expect_end_eventually()?;
229 for p in [51, 52, 53, 55, 56, 57] { 218 for p in [51, 52, 53, 55, 56, 57] {
230 relay::shutdown_relay(8000 + p)?; 219 relay::shutdown_relay(8000 + p)?;
@@ -495,7 +484,6 @@ mod when_repo_not_previously_claimed {
495 ], 484 ],
496 1, 485 1,
497 )?; 486 )?;
498 expect_prompt_to_set_origin(&mut p)?;
499 p.expect_end_eventually()?; 487 p.expect_end_eventually()?;
500 for p in [51, 52, 53, 55, 56, 57] { 488 for p in [51, 52, 53, 55, 56, 57] {
501 relay::shutdown_relay(8000 + p)?; 489 relay::shutdown_relay(8000 + p)?;