From 40a66b40cdafaf0db2537a761e7c2f4bd69109d3 Mon Sep 17 00:00:00 2001 From: Harold Hunt Date: Fri, 23 Oct 2026 23:06:09 -0400 Subject: [PATCH] test: run the scanner's snapshot tests on Unix only These run disktree-scan on the test machine and read what it sends, so the machine is the host. Clients now refuse Windows hosts, so on Windows they failed with that refusal. The disconnect test reads no snapshot and still runs everywhere. --- crates/disktree-scan/tests/stdio.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/disktree-scan/tests/stdio.rs b/crates/disktree-scan/tests/stdio.rs index b29f4c7..005a996 100644 --- a/crates/disktree-scan/tests/stdio.rs +++ b/crates/disktree-scan/tests/stdio.rs @@ -2,9 +2,13 @@ use std::io::{BufRead as _, BufReader, Write as _}; use std::process::{Command, Stdio}; +#[cfg(unix)] use disktree_core::remote::{Request, read_snapshot}; use disktree_core::scan::ScanOptions; +// The helper runs here, so this machine is the host, and clients only +// accept Unix hosts. +#[cfg(unix)] #[test] fn executable_returns_a_read_only_snapshot() { let dir = tempfile::tempdir().unwrap(); @@ -101,6 +105,9 @@ fn disconnect_stops_a_helper_even_when_its_output_is_blocked() { wait_bounded(&mut helper.0); } +// The helper runs here, so this machine is the host, and clients only +// accept Unix hosts. +#[cfg(unix)] #[test] fn a_live_supervised_client_receives_a_complete_snapshot() { let dir = tempfile::tempdir().unwrap(); @@ -239,6 +246,9 @@ fn assert_bounded_stream_memory(root: &std::path::Path) { drop(input); } +// The helper runs here, so this machine is the host, and clients only +// accept Unix hosts. +#[cfg(unix)] #[test] fn executable_discovers_roots_without_scanning_a_path() { let mut helper = supervised_helper();