upleb.uk

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

summaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-07-24 14:48:33 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-07-24 14:48:33 +0100
commitdc05e1ca72d4c7eec9e6aeb989c2aef35a33aab8 (patch)
tree5cbfb0709ba88e79949a8b69ce2ef9de939928ea /test_utils
parentab8785ef986b583dbded578c5b90435adfca526f (diff)
test: fix `pull` tests
it was so much clearer what the problem was after abstracting reused test code
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/src/lib.rs3
1 files changed, 1 insertions, 2 deletions
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(
1196 Ok(branch_name) 1196 Ok(branch_name)
1197} 1197}
1198 1198
1199pub fn ammend_last_commit_and_checkout_main(test_repo: &GitTestRepo) -> Result<String> { 1199pub fn amend_last_commit(test_repo: &GitTestRepo) -> Result<String> {
1200 let branch_name = 1200 let branch_name =
1201 remove_latest_commit_so_proposal_branch_is_behind_and_checkout_main(test_repo)?; 1201 remove_latest_commit_so_proposal_branch_is_behind_and_checkout_main(test_repo)?;
1202 // add another commit (so we have an ammened local branch) 1202 // add another commit (so we have an ammened local branch)
1203 test_repo.checkout(&branch_name)?; 1203 test_repo.checkout(&branch_name)?;
1204 std::fs::write(test_repo.dir.join("ammended-commit.md"), "some content")?; 1204 std::fs::write(test_repo.dir.join("ammended-commit.md"), "some content")?;
1205 test_repo.stage_and_commit("add ammended-commit.md")?; 1205 test_repo.stage_and_commit("add ammended-commit.md")?;
1206 test_repo.checkout("main")?;
1207 Ok(branch_name) 1206 Ok(branch_name)
1208} 1207}
1209 1208