- boot/ (Java/Maven, JNPF 7.0) — 移除旧的 boot/.git,源码直接纳入仓库
- web/ (Vue 3 + Vite + Ant Design Vue, pnpm)
- docs/, scard/, nax/
- refs/INDEX.md + refs/国标/(其余 refs/* 开源子仓库不纳入)
- 已忽略: connector_data/, jweb/, log/, web/{dist,node_modules,.pnpm}, boot/*/target/, .DS_Store, .idea, .vscode
17 lines
1.0 KiB
JavaScript
17 lines
1.0 KiB
JavaScript
/**
|
|
* TC-PRODUCT_API-018 · 条件不满足时不能办理数据产品传输
|
|
* REQ-016 [FL-4.4] 反向/等价类 P0
|
|
*/
|
|
export const meta = { tc: 'TC-PRODUCT_API-018', req: 'REQ-016', title: '条件不满足时不能办理数据产品传输', type: '反向/等价类', priority: 'P0', needs: ['be'] }
|
|
export async function run(t) {
|
|
await t.login()
|
|
// 不存在的产品 id
|
|
const r1 = await t.api('POST', '/api/ssw/tdc/ApiGateway/Invoke', { productId: 'NOT-EXIST-' + Date.now(), payload: {} })
|
|
t.assert(r1.code !== 200 || /不存在|未找到/.test(r1.msg || ''), `不存在的产品被拒:code=${r1.code} msg=${r1.msg || ''}`)
|
|
// 未上架的产品(取一个 OFFLINE 的)
|
|
const off = await t.apiList('/api/ssw/tds/DataProduct', { status: 'OFFLINE' })
|
|
if (off.length) {
|
|
const r2 = await t.api('POST', '/api/ssw/tdc/ApiGateway/Invoke', { productId: off[0].id, payload: {} })
|
|
t.assert(r2.code !== 200 || /下架|不可用|未上架/.test(r2.msg || ''), `OFFLINE 产品被拒:code=${r2.code} msg=${r2.msg || ''}`)
|
|
}
|
|
} |