Files
kra-new/internal/biz/integration/secret_alias_test.go
T

17 lines
643 B
Go

package integration
import "testing"
func TestIntegrationCertificateAliases(t *testing.T) {
for _, key := range []string{"app_cert_content", "root_cert_path", "alipay_public_cert_content", "pkcs12_content", "p12_file", "cert_content", "key_content", "cert_path", "key_file", "client_key", "public_key_pem"} {
if !IsIntegrationSecretKey(key) {
t.Errorf("secret alias was not recognized: %s", key)
}
}
for _, key := range []string{"content", "path", "notify_url", "template_content", "content_type", "platform_serial_no", "public_key_id"} {
if IsIntegrationSecretKey(key) {
t.Errorf("public field was masked: %s", key)
}
}
}