Complete ARNavi VPS onboarding and contextual key controls
Device Core qualification / qualify (push) Successful in 6m45s
Device Core qualification / qualify (push) Successful in 6m45s
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { createHash } from 'node:crypto';
|
||||
|
||||
test('downloadable VPS installer matches its immutable release metadata and deploy size limit', async () => {
|
||||
const metadata = JSON.parse(await readFile(new URL('../src/b2/installer-release.json', import.meta.url), 'utf8'));
|
||||
assert.match(metadata.filename, /^nodedc-arnavi-vps-\d+\.\d+\.\d+\.pyz$/);
|
||||
assert.equal(metadata.environment, 'ubuntu-24.04-amd64');
|
||||
assert.match(metadata.sourceCommit, /^[a-f0-9]{40}$/);
|
||||
assert.equal(metadata.sourceRepository, 'https://git.dcserve.ru/SILVER/NODEDC_MISSION_CORE_ARNAVI-VPS.git');
|
||||
const file = await readFile(new URL('../public/installers/' + metadata.filename, import.meta.url));
|
||||
assert.equal(file.length, metadata.bytes);
|
||||
assert.ok(file.length < 16 * 1024 * 1024);
|
||||
assert.equal(createHash('sha256').update(file).digest('hex'), metadata.sha256);
|
||||
assert.equal(file.subarray(0, 2).toString(), 'PK');
|
||||
});
|
||||
Reference in New Issue
Block a user