diff options
| -rw-r--r-- | tests/git_remote_helper.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/git_remote_helper.rs b/tests/git_remote_helper.rs index 00f9be3..dc6d931 100644 --- a/tests/git_remote_helper.rs +++ b/tests/git_remote_helper.rs | |||
| @@ -1734,7 +1734,7 @@ mod push { | |||
| 1734 | 1734 | ||
| 1735 | let before = r55.events.iter().cloned().collect::<HashSet<Event>>(); | 1735 | let before = r55.events.iter().cloned().collect::<HashSet<Event>>(); |
| 1736 | 1736 | ||
| 1737 | let cli_tester_handle = std::thread::spawn(move || -> Result<()> { | 1737 | let cli_tester_handle = std::thread::spawn(move || -> Result<(String, String)> { |
| 1738 | let branch_name = get_proposal_branch_name_from_events(&events, FEATURE_BRANCH_NAME_1)?; | 1738 | let branch_name = get_proposal_branch_name_from_events(&events, FEATURE_BRANCH_NAME_1)?; |
| 1739 | 1739 | ||
| 1740 | let git_repo = clone_git_repo_with_nostr_url()?; | 1740 | let git_repo = clone_git_repo_with_nostr_url()?; |
| @@ -1750,15 +1750,13 @@ mod push { | |||
| 1750 | cli_expect_nostr_fetch(&mut p)?; | 1750 | cli_expect_nostr_fetch(&mut p)?; |
| 1751 | p.expect(format!("fetching refs list: {}...\r\n\r", source_path).as_str())?; | 1751 | p.expect(format!("fetching refs list: {}...\r\n\r", source_path).as_str())?; |
| 1752 | p.expect(format!("To {}\r\n", get_nostr_remote_url()?).as_str())?; | 1752 | p.expect(format!("To {}\r\n", get_nostr_remote_url()?).as_str())?; |
| 1753 | p.expect_end_with( | 1753 | let output = p.expect_end_eventually()?; |
| 1754 | format!(" eb5d678..7de5e41 {branch_name} -> {branch_name}\r\n").as_str(), | ||
| 1755 | )?; | ||
| 1756 | 1754 | ||
| 1757 | for p in [51, 52, 53, 55, 56, 57] { | 1755 | for p in [51, 52, 53, 55, 56, 57] { |
| 1758 | relay::shutdown_relay(8000 + p)?; | 1756 | relay::shutdown_relay(8000 + p)?; |
| 1759 | } | 1757 | } |
| 1760 | 1758 | ||
| 1761 | Ok(()) | 1759 | Ok((output, branch_name)) |
| 1762 | }); | 1760 | }); |
| 1763 | // launch relays | 1761 | // launch relays |
| 1764 | let _ = join!( | 1762 | let _ = join!( |
| @@ -1770,10 +1768,13 @@ mod push { | |||
| 1770 | r57.listen_until_close(), | 1768 | r57.listen_until_close(), |
| 1771 | ); | 1769 | ); |
| 1772 | 1770 | ||
| 1773 | cli_tester_handle.join().unwrap()?; | 1771 | let (output, branch_name) = cli_tester_handle.join().unwrap()?; |
| 1772 | |||
| 1773 | assert_eq!( | ||
| 1774 | output, | ||
| 1775 | format!(" eb5d678..7de5e41 {branch_name} -> {branch_name}\r\n").as_str(), | ||
| 1776 | ); | ||
| 1774 | 1777 | ||
| 1775 | // TODO source repo doesn't have proposal branch | ||
| 1776 | // TODO | ||
| 1777 | let new_events = r55 | 1778 | let new_events = r55 |
| 1778 | .events | 1779 | .events |
| 1779 | .iter() | 1780 | .iter() |