mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
fix(ql3): bind alpha artifacts to CI evidence
This commit is contained in:
@@ -124,3 +124,44 @@ test('rejects removal of the fresh Owner journey or two-image manifest', () => {
|
||||
fs.rmSync(temporaryRoot, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test('rejects Alpha evidence recorded before all native gates', () => {
|
||||
const temporaryRoot = fs.mkdtempSync(
|
||||
path.join(os.tmpdir(), 'ql3-local-alpha-evidence-order-'),
|
||||
);
|
||||
try {
|
||||
fs.mkdirSync(path.join(temporaryRoot, 'deploy/containers'), {
|
||||
recursive: true,
|
||||
});
|
||||
fs.cpSync(
|
||||
path.join(root, 'deploy/containers/ql3-local-operator'),
|
||||
path.join(temporaryRoot, 'deploy/containers/ql3-local-operator'),
|
||||
{ recursive: true },
|
||||
);
|
||||
fs.mkdirSync(path.join(temporaryRoot, '.github/workflows'), {
|
||||
recursive: true,
|
||||
});
|
||||
const workflow = fs
|
||||
.readFileSync(path.join(root, '.github/workflows/ql3-ci.yml'), 'utf8')
|
||||
.replace('--mode=record-verification', '--mode=temporary-marker')
|
||||
.replace('--mode=audit', '--mode=record-verification')
|
||||
.replace('--mode=temporary-marker', '--mode=audit');
|
||||
fs.writeFileSync(
|
||||
path.join(temporaryRoot, '.github/workflows/ql3-ci.yml'),
|
||||
workflow,
|
||||
);
|
||||
fs.copyFileSync(
|
||||
path.join(root, 'ql3-release.json'),
|
||||
path.join(temporaryRoot, 'ql3-release.json'),
|
||||
);
|
||||
const report = auditLocalOperatorImageContract(temporaryRoot);
|
||||
assert.equal(report.compatible, false);
|
||||
assert.ok(
|
||||
report.findings.some(
|
||||
({ code }) => code === 'LOCAL_OPERATOR_CI_GATE_ORDER_DRIFT',
|
||||
),
|
||||
);
|
||||
} finally {
|
||||
fs.rmSync(temporaryRoot, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user