test(fleet): close shared trips and verify resource release

This commit is contained in:
2026-10-03 07:51:17 +08:00
parent 2992871975
commit ef1eef3278
3 changed files with 17 additions and 5 deletions
@@ -24,11 +24,13 @@ function harness(root, fail = false) {
assert.equal(options.pdaToken, 'private-pda')
await context.request('POST', '/api/test-owned-command', { idempotencyKey: 'stable-command', password: 'private-pda-password' })
if (fail) throw Error('FIXTURE_FAILED')
return { pdaToken: options.pdaToken, marker: context.marker }
return { pdaToken: options.pdaToken, marker: context.marker, tripNo: 'TR-OFFLINE', members: [{ customerId: '42' }, { customerId: '43' }] }
}, verify: async (_context, _fixture, options) => {
await options.readInventory({ marker: context.marker, customerId: '42', warehouseId: '900' })
context.createdResources.fleetCrossCustomer = { status: 'VERIFIED' }
context.createdResources.fleetTrips = [{ tripNo: 'TR-OFFLINE' }]
},
finish: async (_context, _module, trip) => { trip.closure = { status: 'CARGO_COMPLETED_AND_RESOURCES_RELEASED' } },
} }
}
test('plan is network-free and execution requires explicit TEST, unique run and warehouse', async () => {