/** * TC-PRODUCT_API-017 · 正常办理数据产品传输 * REQ-016 [FL-4.4] 正向/场景法 P0 */ export const meta = { tc: 'TC-PRODUCT_API-017', req: 'REQ-016', title: '正常办理数据产品传输', type: '正向/场景法', priority: 'P0', needs: ['be'] } export async function run(t) { await t.login() // 取一个已上架的产品做传输烟测 const products = await t.apiList('/api/ssw/tds/DataProduct', { status: 'ONLINE' }) if (!products.length) t.skip('暂无 ONLINE 状态产品,先把一个产品上架') const target = products[0] const before = (await t.apiList('/api/ssw/tdc/ApiGateway/Logs', { productId: target.id })).length const r = await t.api('POST', '/api/ssw/tdc/ApiGateway/Invoke', { productId: target.id, payload: { test: 'E2E' } }) t.assert(r.code === 200 || /成功/.test(r.msg || ''), `传输调用:code=${r.code} msg=${r.msg || ''}`) await t.waitIdle() const after = (await t.apiList('/api/ssw/tdc/ApiGateway/Logs', { productId: target.id })).length t.assert(after > before, `传输日志条数增加(${before} → ${after})`) }