test: prepare isolated gray domestic PDA H5 tasks without auto-picking

This commit is contained in:
2026-10-09 17:21:56 +08:00
parent 023b28e31f
commit 74bf0e73c5
7 changed files with 53 additions and 2 deletions
@@ -86,3 +86,14 @@ test('direct gray evidence use cannot bypass module/fault restrictions or failed
})), /gray SSH unavailable/)
assert.equal(run.context.phase4ReceivingEvidenceReader, undefined)
})
test('domestic H5 fixture is opt-in and cannot expand the gray module scope', () => {
const defaults = validateExecutionOptions(parseArguments(args))
assert.equal(defaults.prepareDomesticPdaH5, false)
const prepared = validateExecutionOptions(parseArguments([...args, '--prepare-domestic-pda-h5', 'true']))
assert.equal(new AcceptanceRun(prepared).context.prepareDomesticPdaH5, true)
for (const invalid of ['yes', 'false', '1']) assert.throws(() => parseArguments([...args, '--prepare-domestic-pda-h5', invalid]), /必须明确为 true/)
assert.deepEqual(prepared.requestedModules, ['phase5-root-fulfillment'])
assert.throws(() => validateExecutionOptions({ ...prepared, environment: 'test', requestedModules: ['orders'] }), /prepare-domestic-pda-h5/)
})