From 59ae0d5fdfa19b802ad0bb678ce4739af1966788 Mon Sep 17 00:00:00 2001 From: flupkede Date: Sun, 16 Aug 2026 02:08:35 +0200 Subject: [PATCH] fix(tests): canonicalize indexing-route fixture for 8.3 short-name CI runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit indexing_route_answers_json (PR #203) was green locally but red on the Windows CI runner: ReposConfig::register canonicalizes before storing (repos.rs L437), while the /indexing query used the raw tempdir path — on CI the temp root sits under an 8.3 short name (RUNNER~1) that only canonicalize resolves, so covered=false and the assert failed. Same trap and same fix as remove_order_tests' make_proj (PR #197). Note: the embed::cache panic line in the same CI log is the INTENTIONAL caught panic ("simulated mid-test failure") inside catch_unwind — log noise, that test passes. --- src/serve/tests.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/serve/tests.rs b/src/serve/tests.rs index 1b142c6..33fdf2f 100644 --- a/src/serve/tests.rs +++ b/src/serve/tests.rs @@ -1888,8 +1888,14 @@ async fn indexing_route_answers_json() { // Route + handler wiring: a GET with a covered path returns our JSON // (never axum's empty 404), with the covered/indexing fields present. let tmp = tempfile::tempdir().unwrap(); - let repo_path = tmp.path().join("hooked"); - std::fs::create_dir(&repo_path).unwrap(); + let raw_repo = tmp.path().join("hooked"); + std::fs::create_dir(&raw_repo).unwrap(); + // CANONICALIZE (same trap as remove_order_tests' make_proj): on the + // Windows CI runner the temp root sits under an 8.3 short name + // (RUNNER~1) that only canonicalize resolves, and register canonicalizes + // before storing — querying with the raw path made covered=false there + // (green locally, red on CI). + let repo_path = crate::cache::safe_canonicalize(&raw_repo).unwrap(); let mut config = ReposConfig::default(); config