test: harden admin acceptance fixtures and transport retries

This commit is contained in:
2026-09-24 04:38:38 +08:00
parent f5e53db24f
commit eb8662070a
6 changed files with 74 additions and 24 deletions
+6
View File
@@ -289,6 +289,8 @@ function usage() {
--overseas-gateway <url> 四期海外模块必填,海外 Gateway 地址
--username <name> 必填,管理员账号
--password <value> 必填,管理员密码
--pda-username <name> 国内装柜链必填,实际领取任务的 PDA 作业员账号
--pda-password <value> 国内装柜链必填,PDA 作业员密码
--modules <names> 逗号分隔,默认 ${DEFAULT_MODULES.join(',')}
--customer-name <name> 指定本轮隔离客户名称,默认自动生成
--merchant-username <name> 复用既有已审核客户账号,不再创建客户
@@ -398,6 +400,10 @@ export function validateExecutionOptions(options) {
&& (!options.overseasGateway || options.overseasGateway.trim() === '')) {
throw new Error('四期海外模块缺少必填执行参数: overseas-gateway')
}
if (options.modules.some((module) => ['phase3-loading', 'phase3-container-loading'].includes(module))
&& (!options.pdaUsername?.trim() || !options.pdaPassword?.trim())) {
throw new Error('国内装柜链缺少 PDA 作业员凭据: pda-username / pda-password(ADMIN_PDA_USERNAME / ADMIN_PDA_PASSWORD)')
}
if (!Number.isInteger(options.waitSplitCount) || options.waitSplitCount < 1 || options.waitSplitCount > 100) {
throw new Error('wait-split-count必须是1-100的整数')
}