Project live domain trust readiness
This commit is contained in:
parent
6b1bb203df
commit
7a90fad360
5 changed files with 120 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { projectDomainConnectionSteps } from './domain-connection.js';
|
||||
import { projectDomainConnectionSteps, projectDomainTrustSource } from './domain-connection.js';
|
||||
|
||||
test('code-channel account absence cannot be projected as a domain runtime login', () => {
|
||||
const steps = projectDomainConnectionSteps({
|
||||
|
|
@ -35,3 +35,37 @@ test('runtime-ready requires all four verified steps', () => {
|
|||
assert.ok(steps.every(step => step.state === 'verified'));
|
||||
});
|
||||
|
||||
test('a current empty signer registry is projected as a real manifest blocker', () => {
|
||||
const access = {
|
||||
blockers: ['verified_domain_manifest_missing'],
|
||||
runtimeReady: false,
|
||||
stage: 'identity-verified' as const,
|
||||
trustSource: {
|
||||
registryVersion: '1.0.0',
|
||||
signerCount: 0,
|
||||
sourceCommit: '34e1949a113be8d4871e61c094f2ae06e0bc5a45',
|
||||
status: 'CURRENT' as const,
|
||||
},
|
||||
};
|
||||
const manifest = projectDomainConnectionSteps(access)[1];
|
||||
assert.equal(manifest.state, 'blocked');
|
||||
assert.match(manifest.detail, /尚未登记任何目标域签名人/);
|
||||
assert.match(projectDomainTrustSource(access), /当前.*v1\.0\.0.*34e1949a.*已登记签名人 0/);
|
||||
});
|
||||
|
||||
test('an unavailable trust source remains closed without leaking raw transport details', () => {
|
||||
const access = {
|
||||
blockers: ['verified_domain_manifest_missing'],
|
||||
runtimeReady: false,
|
||||
stage: 'identity-verified' as const,
|
||||
trustSource: {
|
||||
reason: 'SOURCE_UNAVAILABLE' as const,
|
||||
registryVersion: null,
|
||||
signerCount: 0,
|
||||
sourceCommit: null,
|
||||
status: 'UNAVAILABLE' as const,
|
||||
},
|
||||
};
|
||||
assert.match(projectDomainConnectionSteps(access)[1].detail, /系统保持关闭/);
|
||||
assert.equal(projectDomainTrustSource(access), '可信清单来源不可用 · 域入口保持关闭');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue