From 30713f065f7b2b3acfa593d45336a82be22c4503 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Wed, 13 May 2026 13:33:25 +0200 Subject: [PATCH] fix(tests): add missing prefix field to Request::Query call sites MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ad4e538 fixed the chroot link error, surfacing the next failure: `cargo test --features full` in check() couldn't compile integration tests because Request::Query gained an optional `prefix` field in 3.4.5 (commit bfbce42) and I missed three constructors under crates/owlry/tests/. Unit tests under src/ were already updated. Locally these tests compiled before because `cargo build --features full` doesn't run them — only `cargo test` does, and I'd been running `--lib` only. The chroot's PKGBUILD `check()` runs the full suite. 352 lib + 27 integration tests now green with --features full. --- crates/owlry/tests/ipc_test.rs | 2 ++ crates/owlry/tests/server_test.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/crates/owlry/tests/ipc_test.rs b/crates/owlry/tests/ipc_test.rs index 79fc10a..ef057c5 100644 --- a/crates/owlry/tests/ipc_test.rs +++ b/crates/owlry/tests/ipc_test.rs @@ -5,6 +5,7 @@ fn test_query_request_roundtrip() { let req = Request::Query { text: "fire".into(), modes: Some(vec!["app".into(), "cmd".into()]), + prefix: None, }; let json = serde_json::to_string(&req).unwrap(); let parsed: Request = serde_json::from_str(&json).unwrap(); @@ -16,6 +17,7 @@ fn test_query_request_without_modes() { let req = Request::Query { text: "fire".into(), modes: None, + prefix: None, }; let json = serde_json::to_string(&req).unwrap(); assert!(!json.contains("modes")); diff --git a/crates/owlry/tests/server_test.rs b/crates/owlry/tests/server_test.rs index 4870ee0..0f7b861 100644 --- a/crates/owlry/tests/server_test.rs +++ b/crates/owlry/tests/server_test.rs @@ -92,6 +92,7 @@ fn test_server_handles_query_request() { let req = Request::Query { text: "nonexistent_query_xyz".into(), modes: None, + prefix: None, }; let resp = roundtrip(&mut stream, &req);