fix: validate PNVS provider rows for alias env

This commit is contained in:
Codex
2026-07-04 00:32:31 +08:00
parent 3a10daf847
commit ae491f592b
4 changed files with 28 additions and 6 deletions

View File

@@ -219,10 +219,28 @@ WORKER_ASSET_SECURITY_SCANNER=metadata_rules,http
WORKER_ASSET_SECURITY_SCAN_HTTP_ENDPOINT=https://scanner.gongxue100.com/api/scan
WORKER_ASSET_SECURITY_SCAN_HTTP_TOKEN=s3cure-asset-scanner-token-2026-06-29-stuvwx
WORKER_ASSET_SECURITY_SCAN_FAIL_OPEN=false
`);
`, {
providerRows: [
{
source: 'auth',
tenantId: 'tenant-pnvs',
provider: 'aliyun-pnvs',
configPublic: {
signName: '短信签名',
templateCode: 'SMS_123456789',
endpoint: 'https://dypnsapi.aliyuncs.com',
templateParam: { code: '##code##', min: '5' },
},
},
],
});
assert.equal(safeAliyunPnvsUnderscoreAlias.status, 0, `aliyun_pnvs readiness should pass without blockers: ${safeAliyunPnvsUnderscoreAlias.stdout} ${safeAliyunPnvsUnderscoreAlias.stderr}`);
assert.equal(safeAliyunPnvsUnderscoreAlias.payload.summary?.blocker, 0, 'aliyun_pnvs readiness should have no blockers');
assert.ok(
safeAliyunPnvsUnderscoreAlias.payload.checks?.some(item => item.id === 'db.auth_sms_provider_configured' && item.status === 'pass'),
'aliyun_pnvs readiness should still validate matching PNVS provider rows',
);
const pnvsTemplateParamWarning = runReadiness(
`