fix: preserve account data and validate CLI operations
This commit is contained in:
1 parent
22a3eebe78
commit
2b6750a971
11 files changed
+300
-119
No files matched your search
@@ -17,3 +17,15 @@ fn rejects_invalid_resolution_format() {
|
||||
assert!(parse_resolution("1920xa").is_err());
|
||||
assert!(parse_resolution("0x1080").is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_memory_update_keeps_existing_setting() {
|
||||
let mut config: crate::instance::InstanceConfig = serde_json::from_value(serde_json::json!({
|
||||
"name": "test", "game_version": "1.21.1", "loader": "vanilla",
|
||||
"loader_version": null, "created": "2026-01-01T00:00:00Z", "memory_max": "8G"
|
||||
}))
|
||||
.unwrap();
|
||||
|
||||
assert!(super::apply_config_update(&mut config, "memory-max", "garbage").is_err());
|
||||
assert_eq!(config.memory_max.as_deref(), Some("8G"));
|
||||
}
|
||||
Reference in new issue
Block a user