fix: 完成商务迁移复核与接口优化并清理历史资料

This commit is contained in:
Yvan
2026-11-04 14:45:02 +08:00
parent 5a96be6a79
commit 297e80827d
176 changed files with 6803 additions and 6002 deletions
@@ -52,6 +52,26 @@ func TestIntegrationConfigSavePublishesUnmaskedRuntimeValues(t *testing.T) {
}
}
func TestCertificateAliasesMaskAndRoundTrip(t *testing.T) {
old := map[string]any{"app_cert_content": "cert", "key_content": "key", "pkcs12_file": "bundle", "template_content": "keep"}
values := map[string]any{}
for key, value := range old {
values[key] = value
}
maskIntegrationSecrets("payment", "alipay", values)
for _, key := range []string{"app_cert_content", "key_content", "pkcs12_file"} {
if values[key] == old[key] {
t.Fatalf("unmasked alias: %s", key)
}
}
mergeIntegrationSecrets("payment", "alipay", values, old)
for key, value := range old {
if values[key] != value {
t.Fatalf("masked edit changed %s", key)
}
}
}
func TestCommunicationDefaultsIncludeKafka(t *testing.T) {
db, err := openWithDriver("sqlite", "file:"+t.Name()+"?mode=memory&cache=shared")
if err != nil {