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);