upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ngit_list.rs34
-rw-r--r--tests/ngit_send.rs8
2 files changed, 21 insertions, 21 deletions
diff --git a/tests/ngit_list.rs b/tests/ngit_list.rs
index 59e326a..30e6fe6 100644
--- a/tests/ngit_list.rs
+++ b/tests/ngit_list.rs
@@ -114,7 +114,7 @@ mod cannot_find_repo_event {
114 coordinate.identifier, 114 coordinate.identifier,
115 ); 115 );
116 p.expect(format!("set git remote \"origin\" to {}\r\n", &nostr_url))?; 116 p.expect(format!("set git remote \"origin\" to {}\r\n", &nostr_url))?;
117 p.expect("fetching updates...\r\n")?; 117 p.expect("Checking nostr relays...\r\n")?;
118 // no updates as they were fetched when searching for repo 118 // no updates as they were fetched when searching for repo
119 p.expect("no updates\r\n")?; 119 p.expect("no updates\r\n")?;
120 p.expect_end_with("no proposals found... create one? try `ngit send`\r\n")?; 120 p.expect_end_with("no proposals found... create one? try `ngit send`\r\n")?;
@@ -199,7 +199,7 @@ mod when_main_branch_is_uptodate {
199 test_repo.populate()?; 199 test_repo.populate()?;
200 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 200 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
201 201
202 p.expect("fetching updates...\r\n")?; 202 p.expect("Checking nostr relays...\r\n")?;
203 p.expect_eventually("\r\n")?; // some updates listed here 203 p.expect_eventually("\r\n")?; // some updates listed here
204 let mut c = p.expect_choice( 204 let mut c = p.expect_choice(
205 "all proposals", 205 "all proposals",
@@ -318,7 +318,7 @@ mod when_main_branch_is_uptodate {
318 test_repo.populate()?; 318 test_repo.populate()?;
319 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 319 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
320 320
321 p.expect("fetching updates...\r\n")?; 321 p.expect("Checking nostr relays...\r\n")?;
322 p.expect_eventually("\r\n")?; // some updates listed here 322 p.expect_eventually("\r\n")?; // some updates listed here
323 let mut c = p.expect_choice( 323 let mut c = p.expect_choice(
324 "all proposals", 324 "all proposals",
@@ -440,7 +440,7 @@ mod when_main_branch_is_uptodate {
440 test_repo.populate()?; 440 test_repo.populate()?;
441 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 441 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
442 442
443 p.expect("fetching updates...\r\n")?; 443 p.expect("Checking nostr relays...\r\n")?;
444 p.expect_eventually("\r\n")?; // some updates listed here 444 p.expect_eventually("\r\n")?; // some updates listed here
445 let mut c = p.expect_choice( 445 let mut c = p.expect_choice(
446 "all proposals", 446 "all proposals",
@@ -518,7 +518,7 @@ mod when_main_branch_is_uptodate {
518 test_repo.populate()?; 518 test_repo.populate()?;
519 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 519 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
520 520
521 p.expect("fetching updates...\r\n")?; 521 p.expect("Checking nostr relays...\r\n")?;
522 p.expect_eventually("\r\n")?; // some updates listed here 522 p.expect_eventually("\r\n")?; // some updates listed here
523 let mut c = p.expect_choice( 523 let mut c = p.expect_choice(
524 "all proposals", 524 "all proposals",
@@ -640,7 +640,7 @@ mod when_main_branch_is_uptodate {
640 test_repo.populate()?; 640 test_repo.populate()?;
641 // create proposal branch 641 // create proposal branch
642 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 642 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
643 p.expect("fetching updates...\r\n")?; 643 p.expect("Checking nostr relays...\r\n")?;
644 p.expect_eventually("\r\n")?; // some updates listed here 644 p.expect_eventually("\r\n")?; // some updates listed here
645 let mut c = p.expect_choice( 645 let mut c = p.expect_choice(
646 "all proposals", 646 "all proposals",
@@ -665,7 +665,7 @@ mod when_main_branch_is_uptodate {
665 test_repo.checkout("main")?; 665 test_repo.checkout("main")?;
666 // run test 666 // run test
667 p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 667 p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
668 p.expect("fetching updates...\r\n")?; 668 p.expect("Checking nostr relays...\r\n")?;
669 p.expect_eventually("\r\n")?; // some updates listed here 669 p.expect_eventually("\r\n")?; // some updates listed here
670 let mut c = p.expect_choice( 670 let mut c = p.expect_choice(
671 "all proposals", 671 "all proposals",
@@ -736,7 +736,7 @@ mod when_main_branch_is_uptodate {
736 test_repo.populate()?; 736 test_repo.populate()?;
737 // create proposal branch 737 // create proposal branch
738 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 738 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
739 p.expect("fetching updates...\r\n")?; 739 p.expect("Checking nostr relays...\r\n")?;
740 p.expect_eventually("\r\n")?; // some updates listed here 740 p.expect_eventually("\r\n")?; // some updates listed here
741 let mut c = p.expect_choice( 741 let mut c = p.expect_choice(
742 "all proposals", 742 "all proposals",
@@ -761,7 +761,7 @@ mod when_main_branch_is_uptodate {
761 test_repo.checkout("main")?; 761 test_repo.checkout("main")?;
762 // run test 762 // run test
763 p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 763 p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
764 p.expect("fetching updates...\r\n")?; 764 p.expect("Checking nostr relays...\r\n")?;
765 p.expect_eventually("\r\n")?; // some updates listed here 765 p.expect_eventually("\r\n")?; // some updates listed here
766 let mut c = p.expect_choice( 766 let mut c = p.expect_choice(
767 "all proposals", 767 "all proposals",
@@ -851,7 +851,7 @@ mod when_main_branch_is_uptodate {
851 851
852 // run test 852 // run test
853 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 853 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
854 p.expect("fetching updates...\r\n")?; 854 p.expect("Checking nostr relays...\r\n")?;
855 p.expect_eventually("\r\n")?; // some updates listed here 855 p.expect_eventually("\r\n")?; // some updates listed here
856 let mut c = p.expect_choice( 856 let mut c = p.expect_choice(
857 "all proposals", 857 "all proposals",
@@ -927,7 +927,7 @@ mod when_main_branch_is_uptodate {
927 927
928 // run test 928 // run test
929 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 929 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
930 p.expect("fetching updates...\r\n")?; 930 p.expect("Checking nostr relays...\r\n")?;
931 p.expect_eventually("\r\n")?; // some updates listed here 931 p.expect_eventually("\r\n")?; // some updates listed here
932 let mut c = p.expect_choice( 932 let mut c = p.expect_choice(
933 "all proposals", 933 "all proposals",
@@ -1040,7 +1040,7 @@ mod when_main_branch_is_uptodate {
1040 1040
1041 // run test 1041 // run test
1042 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 1042 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
1043 p.expect("fetching updates...\r\n")?; 1043 p.expect("Checking nostr relays...\r\n")?;
1044 p.expect_eventually("\r\n")?; // some updates listed here 1044 p.expect_eventually("\r\n")?; // some updates listed here
1045 let mut c = p.expect_choice( 1045 let mut c = p.expect_choice(
1046 "all proposals", 1046 "all proposals",
@@ -1119,7 +1119,7 @@ mod when_main_branch_is_uptodate {
1119 1119
1120 // run test 1120 // run test
1121 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 1121 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
1122 p.expect("fetching updates...\r\n")?; 1122 p.expect("Checking nostr relays...\r\n")?;
1123 p.expect_eventually("\r\n")?; // some updates listed here 1123 p.expect_eventually("\r\n")?; // some updates listed here
1124 let mut c = p.expect_choice( 1124 let mut c = p.expect_choice(
1125 "all proposals", 1125 "all proposals",
@@ -1224,7 +1224,7 @@ mod when_main_branch_is_uptodate {
1224 1224
1225 // run test 1225 // run test
1226 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 1226 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
1227 p.expect("fetching updates...\r\n")?; 1227 p.expect("Checking nostr relays...\r\n")?;
1228 p.expect_eventually("\r\n")?; // some updates listed here 1228 p.expect_eventually("\r\n")?; // some updates listed here
1229 let mut c = p.expect_choice( 1229 let mut c = p.expect_choice(
1230 "all proposals", 1230 "all proposals",
@@ -1306,7 +1306,7 @@ mod when_main_branch_is_uptodate {
1306 1306
1307 // run test 1307 // run test
1308 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 1308 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
1309 p.expect("fetching updates...\r\n")?; 1309 p.expect("Checking nostr relays...\r\n")?;
1310 p.expect_eventually("\r\n")?; // some updates listed here 1310 p.expect_eventually("\r\n")?; // some updates listed here
1311 let mut c = p.expect_choice( 1311 let mut c = p.expect_choice(
1312 "all proposals", 1312 "all proposals",
@@ -1408,7 +1408,7 @@ mod when_main_branch_is_uptodate {
1408 test_repo.checkout("main")?; 1408 test_repo.checkout("main")?;
1409 1409
1410 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 1410 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
1411 p.expect("fetching updates...\r\n")?; 1411 p.expect("Checking nostr relays...\r\n")?;
1412 p.expect_eventually("\r\n")?; // some updates listed here 1412 p.expect_eventually("\r\n")?; // some updates listed here
1413 let mut c = p.expect_choice( 1413 let mut c = p.expect_choice(
1414 "all proposals", 1414 "all proposals",
@@ -1481,7 +1481,7 @@ mod when_main_branch_is_uptodate {
1481 test_repo.checkout("main")?; 1481 test_repo.checkout("main")?;
1482 1482
1483 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]); 1483 let mut p = CliTester::new_from_dir(&test_repo.dir, ["-i", "list"]);
1484 p.expect("fetching updates...\r\n")?; 1484 p.expect("Checking nostr relays...\r\n")?;
1485 p.expect_eventually("\r\n")?; // some updates listed here 1485 p.expect_eventually("\r\n")?; // some updates listed here
1486 let mut c = p.expect_choice( 1486 let mut c = p.expect_choice(
1487 "all proposals", 1487 "all proposals",
diff --git a/tests/ngit_send.rs b/tests/ngit_send.rs
index eca09d5..67b2209 100644
--- a/tests/ngit_send.rs
+++ b/tests/ngit_send.rs
@@ -80,7 +80,7 @@ mod when_commits_behind_ask_to_proceed {
80 } 80 }
81 81
82 fn expect_confirm_prompt(p: &'_ mut CliTester) -> Result<CliTesterConfirmPrompt<'_>> { 82 fn expect_confirm_prompt(p: &'_ mut CliTester) -> Result<CliTesterConfirmPrompt<'_>> {
83 p.expect("fetching updates...\r\n")?; 83 p.expect("Checking nostr relays...\r\n")?;
84 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates 84 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates
85 p.expect("creating proposal from 2 commits:\r\n")?; 85 p.expect("creating proposal from 2 commits:\r\n")?;
86 p.expect("fe973a8 add t4.md\r\n")?; 86 p.expect("fe973a8 add t4.md\r\n")?;
@@ -230,7 +230,7 @@ fn cli_tester_create_proposal(git_repo: &GitTestRepo, include_cover_letter: bool
230} 230}
231 231
232fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { 232fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> {
233 p.expect("fetching updates...\r\n")?; 233 p.expect("Checking nostr relays...\r\n")?;
234 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates 234 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates
235 p.expect("creating proposal from 2 commits:\r\n")?; 235 p.expect("creating proposal from 2 commits:\r\n")?;
236 p.expect("fe973a8 add t4.md\r\n")?; 236 p.expect("fe973a8 add t4.md\r\n")?;
@@ -1307,7 +1307,7 @@ mod when_range_ommited_prompts_for_selection_defaulting_ahead_of_main {
1307 CliTester::new_from_dir(&git_repo.dir, args) 1307 CliTester::new_from_dir(&git_repo.dir, args)
1308 } 1308 }
1309 fn expect_msgs_first(p: &mut CliTester) -> Result<()> { 1309 fn expect_msgs_first(p: &mut CliTester) -> Result<()> {
1310 p.expect("fetching updates...\r\n")?; 1310 p.expect("Checking nostr relays...\r\n")?;
1311 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates 1311 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates
1312 let mut selector = p.expect_multi_select( 1312 let mut selector = p.expect_multi_select(
1313 "select commits for proposal", 1313 "select commits for proposal",
@@ -1513,7 +1513,7 @@ mod root_proposal_specified_using_in_reply_to_with_range_of_head_2_and_cover_let
1513 CliTester::new_from_dir(&git_repo.dir, args) 1513 CliTester::new_from_dir(&git_repo.dir, args)
1514 } 1514 }
1515 fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { 1515 fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> {
1516 p.expect("fetching updates...\r\n")?; 1516 p.expect("Checking nostr relays...\r\n")?;
1517 p.expect("updates: 1 announcement, 1 announcement update, 1 proposal\r\n")?; 1517 p.expect("updates: 1 announcement, 1 announcement update, 1 proposal\r\n")?;
1518 let proposal_root_bech32 = get_pretend_proposal_root_event().id.to_bech32().unwrap(); 1518 let proposal_root_bech32 = get_pretend_proposal_root_event().id.to_bech32().unwrap();
1519 p.expect(format!( 1519 p.expect(format!(