forked from wangziqi/gongxue-base
chore: gate launch on PNVS diagnostics
This commit is contained in:
@@ -130,6 +130,30 @@ assert.ok(
|
||||
'missing PNVS SMS smoke should be reported as a blocker',
|
||||
);
|
||||
|
||||
const missingSmsPnvsDiagnostics = runGate(tempDir => {
|
||||
const evidence = createEvidence(tempDir);
|
||||
evidence.checks = evidence.checks.filter(item => item.id !== 'auth.sms-pnvs-diagnostics');
|
||||
return evidence;
|
||||
});
|
||||
assert.notEqual(missingSmsPnvsDiagnostics.status, 0, 'missing PNVS diagnostics should fail launch gate');
|
||||
assert.ok(
|
||||
missingSmsPnvsDiagnostics.payload.checks?.some(item => item.id === 'check.auth.sms-pnvs-diagnostics' && item.status === 'blocker'),
|
||||
'missing PNVS diagnostics should be reported as a blocker',
|
||||
);
|
||||
|
||||
const wrongSmsPnvsDiagnostics = runGate(tempDir => {
|
||||
const evidence = createEvidence(tempDir);
|
||||
const item = evidence.checks.find(check => check.id === 'auth.sms-pnvs-diagnostics');
|
||||
item.summary.env.providerMatchesPnvs = false;
|
||||
item.summary.provider.provider = 'aliyun';
|
||||
return evidence;
|
||||
});
|
||||
assert.notEqual(wrongSmsPnvsDiagnostics.status, 0, 'non-PNVS diagnostics should fail launch gate');
|
||||
assert.ok(
|
||||
wrongSmsPnvsDiagnostics.payload.checks?.some(item => item.id === 'check.auth.sms-pnvs-diagnostics.summary' && item.status === 'blocker'),
|
||||
'non-PNVS diagnostics should be reported as a blocker',
|
||||
);
|
||||
|
||||
const wrongSmsProviderSmoke = runGate(tempDir => {
|
||||
const evidence = createEvidence(tempDir);
|
||||
const item = evidence.checks.find(check => check.id === 'auth.sms-pnvs-remote-smoke');
|
||||
|
||||
Reference in New Issue
Block a user