Commit acc77919 authored by Ben Boeckel's avatar Ben Boeckel

test: ensure that the new tree is correct

parent c58d80ee
Pipeline #68691 passed with stage
......@@ -438,8 +438,18 @@ fn test_setup_merge() {
if let MergeStatus::Mergeable(bases) = status {
let merge = workarea.setup_merge(&bases, &base, &topic).unwrap();
if let MergeResult::Ready(_) = merge {
// OK
if let MergeResult::Ready(command) = merge {
let commit = command.commit("commit message").unwrap();
let rev_parse = ctx.git()
.arg("rev-parse")
.arg("--verify")
.arg(format!("{}^{{tree}}", commit))
.output()
.unwrap();
assert!(rev_parse.status.success());
let merged_tree = String::from_utf8_lossy(&rev_parse.stdout);
assert_eq!(merged_tree.trim(), "254e4e42cb914f935679319389e2af07eebb2157");
} else {
panic!("expected the merge from {} into {} to be fine: {:?}",
topic,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment