From aefaadcdf8891d8fb235f87e14c498016b3fbcef Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 12 Dec 2024 13:53:57 +0000 Subject: test(push): ff merge commit tag `merge-commit-id` allow any order of the commit ids --- tests/git_remote_nostr/push.rs | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'tests') diff --git a/tests/git_remote_nostr/push.rs b/tests/git_remote_nostr/push.rs index 2e9642f..e5d1b13 100644 --- a/tests/git_remote_nostr/push.rs +++ b/tests/git_remote_nostr/push.rs @@ -1174,22 +1174,35 @@ async fn proposal_fast_forward_merge_commits_pushed_to_main_leads_to_status_even .to_string() }) .collect::>(); + assert_eq!( - [ - vec!["merge-commit-id".to_string()], - patch_commit_ids_parents_first - ] - .concat(), - merge_status - .tags + // HashSet::::from_iter(vec![ + // "merge-commit-id".to_string(), + // "6bd4f54bdf6a9ef2ec09e88e7a8d05376b0c1ff4".to_string(), + // "eb5d67886abad23c259ebd684c2bba233f9ed3d1".to_string(), + // ]), + HashSet::from_iter( + [ + vec!["merge-commit-id".to_string()], + patch_commit_ids_parents_first + ] + .concat() .iter() - .find(|t| t.as_slice()[0].eq("merge-commit-id")) - .unwrap() - .clone() - .to_vec(), + .cloned() + ), + HashSet::::from_iter( + merge_status + .tags + .iter() + .find(|t| t.as_slice()[0].eq("merge-commit-id")) + .unwrap() + .clone() + .to_vec() + .iter() + .cloned() + ), "status sets correct merge-commit-id tag {merge_status:?}" ); - for patch_id in proposal_patches .iter() .map(|e| e.id.to_string()) -- cgit v1.2.3