test: tidy remaining test harness edits

This commit is contained in:
Bryan Helmkamp 2026-04-05 12:17:35 -04:00
parent 0d9ea168af
commit a9d91dbda2
2 changed files with 9 additions and 3 deletions

View file

@ -8,7 +8,9 @@ fn parse_ndjson(stdout: &[u8]) -> Vec<Value> {
.expect("stdout should be valid UTF-8")
.lines()
.filter(|line| !line.trim().is_empty())
.map(|line| serde_json::from_str::<Value>(line).expect("logs output should be valid NDJSON"))
.map(|line| {
serde_json::from_str::<Value>(line).expect("logs output should be valid NDJSON")
})
.collect()
}
@ -22,7 +24,8 @@ fn assert_event_sequence_contains(events: &[Value], expected: &[&str]) {
for expected_name in expected {
let Some(found_at) = event_names[cursor..]
.iter()
.position(|name| name == expected_name) else {
.position(|name| name == expected_name)
else {
panic!("missing event {expected_name} in sequence: {event_names:?}");
};
cursor += found_at + 1;

View file

@ -242,7 +242,10 @@ fn json_run_implies_auto_approve_for_human_gates() {
let Some(llm) = llm.as_object_mut() else {
continue;
};
llm.insert("model".to_string(), Value::String("[LLM_MODEL]".to_string()));
llm.insert(
"model".to_string(),
Value::String("[LLM_MODEL]".to_string()),
);
llm.insert(
"provider".to_string(),
Value::String("[LLM_PROVIDER]".to_string()),