From 95cb9c040dfa8ca18bf907a44a86df35b316b6ca Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 24 Jul 2024 16:11:23 +0100 Subject: test: remove old proposal rev amended locally `pull` test. It's failing and only tests for different copy in an obscure scenario --- tests/pull.rs | 67 ----------------------------------------------------------- 1 file changed, 67 deletions(-) (limited to 'tests/pull.rs') diff --git a/tests/pull.rs b/tests/pull.rs index 057e827..6637859 100644 --- a/tests/pull.rs +++ b/tests/pull.rs @@ -305,73 +305,6 @@ mod when_branch_is_checked_out { } } - mod when_old_proposal_revision_amended_locally { - use super::*; - - mod cli_prompts { - use super::*; - - #[tokio::test] - #[serial] - async fn cli_output_correct() -> Result<()> { - let (mut r51, mut r52, mut r53, mut r55, mut r56) = ( - Relay::new(8051, None, None), - Relay::new(8052, None, None), - Relay::new(8053, None, None), - Relay::new(8055, None, None), - Relay::new(8056, None, None), - ); - - r51.events.push(generate_test_key_1_relay_list_event()); - r51.events.push(generate_test_key_1_metadata_event("fred")); - r51.events.push(generate_repo_ref_event()); - - r55.events.push(generate_repo_ref_event()); - r55.events.push(generate_test_key_1_metadata_event("fred")); - r55.events.push(generate_test_key_1_relay_list_event()); - - let cli_tester_handle = std::thread::spawn(move || -> Result<()> { - let (o, test_repo) = - create_proposals_with_first_revised_and_repo_with_unrevised_proposal_checkedout()?; - - amend_last_commit(&test_repo, "add different ammended-commit.md")?; - - // test when branch is ammended an older version of the proposal - let mut p = CliTester::new_from_dir(&test_repo.dir, ["pull"]); - p.expect("fetching updates...\r\n")?; - p.expect_eventually("\r\n")?; // some updates listed here - p.expect( - "you have an amended/rebase version the proposal that is unpublished\r\n", - )?; - p.expect("your local proposal branch (2 ahead 0 behind 'main') has conflicting changes with the latest published proposal (2 ahead 0 behind 'main')\r\n")?; - p.expect("its likely that you have rebased / amended an old proposal version because git has no record of the latest proposal commit.\r\n")?; - p.expect("it is possible that you have been working off the latest version and git has delete this commit as part of a clean up\r\n")?; - p.expect("to view the latest proposal but retain your changes:\r\n")?; - p.expect(" 1) create a new branch off the tip commit of this one to store your changes\r\n")?; - p.expect(" 2) run `ngit list` and checkout the latest published version of this proposal\r\n")?; - p.expect("if you are confident in your changes consider running `ngit push --force`\r\n")?; - p.expect_end()?; - - for p in [51, 52, 53, 55, 56] { - relay::shutdown_relay(8000 + p)?; - } - Ok(()) - }); - - // launch relay - let _ = join!( - r51.listen_until_close(), - r52.listen_until_close(), - r53.listen_until_close(), - r55.listen_until_close(), - r56.listen_until_close(), - ); - cli_tester_handle.join().unwrap()?; - Ok(()) - } - } - } - mod when_latest_proposal_amended_locally { use super::*; -- cgit v1.2.3