mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-22 02:27:44 +08:00
fix(ci): bind recovery evidence to migration stream
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const {
|
||||
postgresqlMainMigrationStream,
|
||||
} = require('../packages/ql3-cluster-postgres/dist/migration/migration.js');
|
||||
|
||||
const FIXTURE = 'qinglong/plugin-package-recovery-e2e-live-contract@v3';
|
||||
const MIGRATION_COUNT = postgresqlMainMigrationStream.migrations.length;
|
||||
const LIMITATIONS = Object.freeze([
|
||||
'isolated PostgreSQL uses explicit TLS disable; production manifests remain verify-full',
|
||||
'the authenticated HTTPS OCI Distribution fixture implements the immutable GET/referrers surface used by the resolver, not a production registry storage implementation',
|
||||
@@ -269,7 +273,7 @@ function validatePluginPackageRecoveryE2ELiveReport(report) {
|
||||
];
|
||||
if (
|
||||
!exactKeys(database, databaseKeys) ||
|
||||
database?.migrationCount !== 65 ||
|
||||
database?.migrationCount !== MIGRATION_COUNT ||
|
||||
database?.capabilityVersion !== 64 ||
|
||||
database?.initialState !== 'active' ||
|
||||
database?.upgradeState !== 'failed' ||
|
||||
@@ -487,6 +491,7 @@ module.exports = {
|
||||
FIXTURE,
|
||||
GATE_KEYS,
|
||||
LIMITATIONS,
|
||||
MIGRATION_COUNT,
|
||||
readPrivateReport,
|
||||
validatePluginPackageRecoveryE2ELiveReport,
|
||||
};
|
||||
|
||||
@@ -14,6 +14,9 @@ const {
|
||||
REGISTRY_EVENT_SCHEMA,
|
||||
createFixture,
|
||||
} = require('./ql3-plugin-package-recovery-e2e-fixture.cjs');
|
||||
const {
|
||||
MIGRATION_COUNT,
|
||||
} = require('./ql3-plugin-package-recovery-e2e-live-audit.cjs');
|
||||
|
||||
const ROOT = path.resolve(__dirname, '..');
|
||||
const FIXTURE_SCRIPT = path.join(
|
||||
@@ -1283,7 +1286,7 @@ SELECT json_build_object(
|
||||
{ capture: true, quiet: true },
|
||||
).stdout;
|
||||
const value = JSON.parse(output);
|
||||
assert.equal(value.migrationCount, 65);
|
||||
assert.equal(value.migrationCount, MIGRATION_COUNT);
|
||||
assert.equal(value.capabilityVersion, 64);
|
||||
assert.equal(value.initialState, 'active');
|
||||
assert.equal(value.initialActiveLockDigest, fixture.initial.lock.lockDigest);
|
||||
|
||||
Reference in New Issue
Block a user