fix(api): 统一 catalog GameMainConfig 字段

This commit is contained in:
2026-07-31 16:05:17 +08:00
parent 4cc143f66d
commit 20ddd67947
4 changed files with 42 additions and 21 deletions
+16 -2
View File
@@ -2572,7 +2572,7 @@ fn build_catalog_status_report(state_dir: &Path) -> anyhow::Result<serde_json::V
"official_seed_hash_marker_count": official_seed_hash_marker_count,
"addressables_catalog_marker_count": snapshot.addressables_marker_checked_count(),
"launcher_metadata": snapshot.launcher_metadata,
"game_main_config": snapshot.game_main_config_bootstrap,
"game_main_config_bootstrap": snapshot.game_main_config_bootstrap,
"snapshot_version": snapshot.snapshot_version,
}))
}
@@ -9987,7 +9987,13 @@ mod tests {
endpoints: Vec::new(),
endpoint_markers: Vec::new(),
launcher_metadata: None,
game_main_config_bootstrap: None,
game_main_config_bootstrap: Some(bat_infrastructure::GameMainConfigSnapshot {
server_info_data_url: Some(
"https://prod-serverinfo.bluearchiveyostar.com/server-info.json"
.to_string(),
),
default_connection_group: Some("Prod-Audit".to_string()),
}),
};
bat_infrastructure::write_snapshot(&snapshot_path, &snapshot).unwrap();
OfficialVersionRecord {
@@ -10091,6 +10097,14 @@ mod tests {
assert_eq!(value["data"]["version"]["id"], "v-current");
assert_eq!(value["data"]["endpoint_count"], 0);
assert_eq!(value["data"]["connection_group_name"], "Prod-Audit");
assert_eq!(
value["data"]["game_main_config_bootstrap"]["default_connection_group"],
"Prod-Audit"
);
assert!(!value["data"]
.as_object()
.unwrap()
.contains_key("game_main_config"));
}
#[test]