Watch
0
0
Fork
You've already forked hyperhive
0

hive-agent: the /clear-todos tests set a harness dir, as the bus reads one

This commit is contained in:
iris 2026-11-16 04:54:18 +01:00 • committed by mara
commit cb9fbfc9da

View file

@ -261,6 +261,8 @@ mod tests {
/// turn; any other body, even one that merely mentions it, goes through. /// turn; any other body, even one that merely mentions it, goes through.
#[tokio::test] #[tokio::test]
async fn clear_todos_takes_its_message_and_marks_every_todo_done() { async fn clear_todos_takes_its_message_and_marks_every_todo_done() {
// `Bus::new` reads the harness dir; the CI sandbox sets none.
let _harness = crate::paths::harness_dir_guard();
let dir = tempfile::tempdir().expect("a dir"); let dir = tempfile::tempdir().expect("a dir");
let todos = Todos::open(&dir.path().join("todos.sqlite")).expect("a store"); let todos = Todos::open(&dir.path().join("todos.sqlite")).expect("a store");
todos.upsert("router", Some("a"), "a", None, true).unwrap(); todos.upsert("router", Some("a"), "a", None, true).unwrap();
@ -305,6 +307,7 @@ mod tests {
#[test] #[test]
fn clear_todos_without_a_store_says_so() { fn clear_todos_without_a_store_says_so() {
let _harness = crate::paths::harness_dir_guard();
let bus = Bus::new(); let bus = Bus::new();
let mut events = bus.subscribe(); let mut events = bus.subscribe();
assert!(clear_todos("/clear-todos", None, &bus)); assert!(clear_todos("/clear-todos", None, &bus));