fix: preserve diagnostic context in backend test assertions
This commit is contained in:
@@ -8866,7 +8866,14 @@ mod tests {
|
|||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.expect_err("closed session must reject local operation without another request");
|
.expect_err("closed session must reject local operation without another request");
|
||||||
assert!(matches!(error, WorkdirError::Unavailable(_)));
|
assert!(matches!(
|
||||||
|
error.classification_source(),
|
||||||
|
WorkdirError::Unavailable(_)
|
||||||
|
));
|
||||||
|
assert_eq!(
|
||||||
|
error.failure_reason(),
|
||||||
|
Some(workdir::WorkdirFailureReason::SessionClosed)
|
||||||
|
);
|
||||||
server.join().expect("mock remote server finished");
|
server.join().expect("mock remote server finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37791,9 +37791,13 @@ mod tests {
|
|||||||
)))
|
)))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
let error = write
|
||||||
|
.await
|
||||||
|
.unwrap()
|
||||||
|
.expect_err("mismatched or lost mutation response must remain outcome-unknown");
|
||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
write.await.unwrap(),
|
error.classification_source(),
|
||||||
Err(workdir::WorkdirError::OutcomeUnknown(_))
|
workdir::WorkdirError::OutcomeUnknown(_)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user