test(return): cover isolation and concurrency; fix receipt and packing races
This commit is contained in:
@@ -26,7 +26,7 @@ async function waitForDimensionInitialization(context, tenantId) {
|
||||
if (status !== 'READY') throw new Error(`客户默认尺寸初始化未就绪: ${status}`)
|
||||
}
|
||||
|
||||
export async function run(context) {
|
||||
export async function run(context, { publishEnvironment = true } = {}) {
|
||||
const suffix = context.marker.replace(/[^0-9A-Z]/gi, '').slice(-10).padStart(10, '0')
|
||||
const customerName = String(context.options?.customerName || '').trim()
|
||||
const tenantName = customerName || `全量验收下单客户-${suffix}`
|
||||
@@ -102,8 +102,10 @@ export async function run(context) {
|
||||
`approved=${[...approvedTypes].join(',') || 'missing'}`, { deploymentBlocker: true })
|
||||
if (!eligible) throw new Error('隔离下单客户必填资质未全部审核通过')
|
||||
|
||||
process.env.MERCHANT_TEST_USERNAME = username
|
||||
process.env.MERCHANT_TEST_PASSWORD = password
|
||||
if (publishEnvironment) {
|
||||
process.env.MERCHANT_TEST_USERNAME = username
|
||||
process.env.MERCHANT_TEST_PASSWORD = password
|
||||
}
|
||||
context.context.merchantQualificationFixture = {
|
||||
tenantId, tenantName, username, password, marker: context.marker,
|
||||
expectedProcurementPrefix: customerName ? null : 'QLYSXDKH',
|
||||
|
||||
Reference in New Issue
Block a user