From dc05e1ca72d4c7eec9e6aeb989c2aef35a33aab8 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 24 Jul 2024 14:48:33 +0100 Subject: test: fix `pull` tests it was so much clearer what the problem was after abstracting reused test code --- test_utils/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test_utils/src') diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 087f849..866eafb 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -1196,14 +1196,13 @@ pub fn remove_latest_commit_so_proposal_branch_is_behind_and_checkout_main( Ok(branch_name) } -pub fn ammend_last_commit_and_checkout_main(test_repo: &GitTestRepo) -> Result { +pub fn amend_last_commit(test_repo: &GitTestRepo) -> Result { let branch_name = remove_latest_commit_so_proposal_branch_is_behind_and_checkout_main(test_repo)?; // add another commit (so we have an ammened local branch) test_repo.checkout(&branch_name)?; std::fs::write(test_repo.dir.join("ammended-commit.md"), "some content")?; test_repo.stage_and_commit("add ammended-commit.md")?; - test_repo.checkout("main")?; Ok(branch_name) } -- cgit v1.2.3