fix: preserve diagnostic context in backend test assertions

This commit is contained in:
2026-10-24 12:51:28 +09:00
parent 214d6e21dd
commit 0975471986
2 changed files with 14 additions and 3 deletions
+8 -1
View File
@@ -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");
} }
+6 -2
View File
@@ -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(_)
)); ));
} }
} }