test(acceptance): reuse fixed customers and align native fulfillment flows

This commit is contained in:
2026-10-23 04:48:02 +08:00
parent b92f7fe991
commit 139f6b1932
51 changed files with 1076 additions and 228 deletions
@@ -62,6 +62,21 @@ for (const valid of [false, true]) test(`prepare owned pool and pass original de
assert.equal(f.calls.some(c => /\/vehicles|\/drivers|\/iam/.test(c.path)), false)
})
for (const encoded of ['0', '12', '', null, '01', '-1', '9007199254740992']) test(`pool source version uses bounded native Long encoding: ${String(encoded)}`, async () => {
const f = fixture('', true)
const request = f.context.request
f.context.request = async (method, path, body) => {
const response = await request(method, path, body)
if (path.endsWith('/capacity-plan')) response.body.data.recordVersion = encoded
return response
}
if (['0', '12'].includes(encoded)) await prepareLooseboardPool(f.context, f.args, f.bind)
else {
await assert.rejects(prepareLooseboardPool(f.context, f.args, f.bind), /容量依据/)
assert.equal(f.counts().creates, 0)
}
})
for (const fault of ['picked', 'driver', 'foreign cargo', 'loaded', 'network', 'draft replay', 'publish replay', 'disk']) {
test(`pool preparation fails closed on ${fault}`, async () => {
const f = fixture(fault)