统一配置JSON缩进排版并保持摘要与历史兼容
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-08 21:08:36 +08:00
1 parent b705f00b22
commit 560605a8e1
10 files changed
+360 -13

No files matched your search

+8 -2
View File
@@ -503,8 +503,14 @@ func TestConfigManagerMailSectionAppliesBothPartitionsWithoutMailFile(t *testing
if err != nil {
t.Fatal(err)
}
if !strings.Contains(string(data), `"generation":2`) {
t.Fatalf("%s was not updated to generation 2: %s", name, data)
var saved struct {
Meta SectionMeta `json:"meta"`
}
if err := json.Unmarshal(data, &saved); err != nil {
t.Fatal(err)
}
if saved.Meta.Generation != 2 {
t.Fatalf("%s 未更新至第二代配置", name)
}
}
reloaded, err := NewConfigLoader(root, options).Load()