From 01def4bd8a6f5584dd6d9f3623e13001766657b8 Mon Sep 17 00:00:00 2001 From: ari Date: Mon, 19 Oct 2026 17:38:40 -0400 Subject: [PATCH] Make defaults_only config test independent of host /etc config Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_019dpKwZWtahQU4V2NhpVmLt --- src/config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index dfc929c..0f14aa3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -348,8 +348,10 @@ mod tests { #[test] fn defaults_only() { - Jail::expect_with(|_| { - let c = load(None, &CliOverrides::default()).unwrap(); + Jail::expect_with(|jail| { + // An explicit empty file keeps the test independent of the host's /etc config. + jail.create_file("empty.toml", "")?; + let c = load(Some("empty.toml"), &CliOverrides::default()).unwrap(); assert_eq!(c, Config::default()); assert_eq!(c.server.port, 1984); assert!(c.auth.enabled);