Make defaults_only config test independent of host /etc config
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019dpKwZWtahQU4V2NhpVmLt
This commit is contained in:
1 parent
d04d99a9a6
commit
01def4bd8a
1 file changed
+4
-2
+4
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user