test: tighten weak assertions and isolate global state

Assert the full InstanceConfig on JSON roundtrip (adds PartialEq to
the derive), verify kill signal delivery, check defaults in the
missing-config test, and take TEST_LOCK plus clear progress state in
the mrpack unsafe-path test like its siblings.
This commit is contained in:
objz committed 2026-08-24 19:15:03 +02:00
1 parent 7a6145342d
commit e99e307790
5 files changed
+30 -8

No files matched your search

+6 -1
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
use super::*;
#[test]
@@ -30,7 +33,9 @@ fn load_config_from_empty_file() {
fn load_config_missing_file_uses_defaults() {
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path().join("nonexistent.toml");
load_config(&path).unwrap();
let config = load_config(&path).unwrap();
assert_eq!(config.defaults.memory_max, "2G");
assert_eq!(config.defaults.memory_min, "512M");
}
#[test]