/** * TC-PRODUCT_API-014 · 条件不满足时不能办理数据产品使用申请 * REQ-016 [FL-4.4] 反向/等价类 P0 */ export const meta = { tc: 'TC-PRODUCT_API-014', req: 'REQ-016', title: '条件不满足时不能办理数据产品使用申请', type: '反向/等价类', priority: 'P0', needs: ['be','manual'] } export async function run(t) { await t.login() // 数据产品使用申请:上游是 TDC 的 apply 端点(通过合约/订阅链路触发) // 这里直接用 chain 已上链的合约做反向:缺 spaceId 的申请应被拒 const r = await t.api('POST', '/api/ssw/tdc/ApiGateway/Invoke', { productId: null, payload: {} }) t.assert(r.code !== 200 || /不能为空|必填/.test(r.msg || ''), `缺 productId 被拒:code=${r.code} msg=${r.msg || ''}`) t.manual([ '人工核对更全面的反向场景:', '1) 产品 status=OFFLINE 的不可申请;', '2) 申请人不属于目标 connector 的租户被拒;', '3) 配额用尽被拒(产品 quotaTotal 已用完)。' ].join('\n')) }