feat(ql3): establish 3.0 incubation baseline

This commit is contained in:
whyour
2026-08-12 00:25:26 +08:00
parent 4bf92dcfeb
commit c699c32461
2817 changed files with 779642 additions and 653 deletions
@@ -0,0 +1,34 @@
const assert = require('node:assert/strict');
const { test } = require('node:test');
const {
bootstrapEdgeAdoptedStorage,
} = require('@qinglong/local-admin/adopted-profile/edge');
const {
bootstrapStandaloneAdoptedStorage,
} = require('@qinglong/local-admin/adopted-profile/standalone');
for (const [profile, bootstrap] of [
['edge', bootstrapEdgeAdoptedStorage],
['standalone', bootstrapStandaloneAdoptedStorage],
]) {
test(`adopted ${profile} subpath fixes the Profile while remaining default-off`, async () => {
const storage = [];
const adoption = [];
const result = await bootstrap({
enabled: false,
sourcePath: 'invalid',
targetPath: 'invalid',
recoveryPath: 'invalid',
manifestPath: 'invalid',
activationPath: 'invalid',
expectedActivationDigest: 'invalid',
audit: (record) => storage.push(record),
adoptionAudit: (record) => adoption.push(record),
});
assert.equal(result.status, 'disabled');
assert.equal(result.profile, profile);
assert.equal(storage[0].profile, profile);
assert.equal(adoption[0].profile, profile);
await result.stop();
});
}