mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
fix(ci): bind plugin recovery completion evidence
This commit is contained in:
@@ -20,6 +20,7 @@ const {
|
||||
} = require('../../scripts/ql3-plugin-package-recovery-e2e-live-audit.cjs');
|
||||
const {
|
||||
writePrivateReport,
|
||||
buildOrderingEvidence,
|
||||
} = require('../../scripts/ql3-plugin-package-recovery-e2e-live-contract.cjs');
|
||||
|
||||
function validReport() {
|
||||
@@ -130,6 +131,33 @@ test('offline audit accepts one exact low-sensitive recovery report', () => {
|
||||
assert.deepEqual(result.findings, []);
|
||||
});
|
||||
|
||||
test('producer binds ordering to the recovery completion timestamp carried into runtime', () => {
|
||||
const ordering = buildOrderingEvidence(
|
||||
{
|
||||
metadata: { uid: 'migration-job' },
|
||||
status: { completionTime: '2026-08-14T08:00:01.000Z' },
|
||||
},
|
||||
{
|
||||
metadata: { uid: 'initial-recovery-job' },
|
||||
status: { completionTime: '2026-08-14T08:00:02.000Z' },
|
||||
},
|
||||
{
|
||||
metadata: { uid: 'upgrade-recovery-job' },
|
||||
status: { completionTime: '2026-08-14T08:00:03.000Z' },
|
||||
},
|
||||
{
|
||||
creationTimestamp: '2026-08-14T08:00:05.000Z',
|
||||
recoveryJobUid: 'upgrade-recovery-job',
|
||||
recoveryCompletedAt: '2026-08-14T08:00:04.000Z',
|
||||
},
|
||||
);
|
||||
assert.equal(
|
||||
ordering.upgradeRecoveryCompletedAt,
|
||||
'2026-08-14T08:00:04.000Z',
|
||||
);
|
||||
assert.equal(ordering.runtimeBoundRecoveryJobUid, 'upgrade-recovery-job');
|
||||
});
|
||||
|
||||
test('offline audit rejects broken upgrade, ordering and image relationships', () => {
|
||||
const report = validReport();
|
||||
report.database.upgradeRevisionCount = 1;
|
||||
|
||||
Reference in New Issue
Block a user