fix: 完成商务迁移复核与接口优化并清理历史资料
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user