feature: 增加功能 导出详细报告
This commit is contained in:
@@ -37,13 +37,13 @@ describe('service endpoint contracts', () => {
|
||||
await providers.create({ provider_id: 'target', base_url: 'https://example.com', chat_path: '/chat', models_path: '/models', model_name: 'm', auth_type: 'none', api_key: '', auth_header: 'Authorization', auth_prefix: 'Bearer', verify_ssl: true })
|
||||
await providers.update('target', { model_name: 'm2' }); await providers.check('target'); await providers.models('target'); await providers.remove('target')
|
||||
const idempotencyKey = '00000000-0000-4000-8000-000000000001'
|
||||
await runs.list(); await runs.get(1); await runs.start({ profile: 'smoke', auto_judge: true }, idempotencyKey); await runs.cancel(1); await runs.resume(1); await runs.retryErrors(1); await runs.retryResult(1, 'R0049'); await runs.results(1); await runs.remove(1)
|
||||
await runs.list(); await runs.get(1); await runs.start({ profile: 'smoke', auto_judge: true }, idempotencyKey); await runs.cancel(1); await runs.resume(1); await runs.retryErrors(1); await runs.retryResult(1, 'R0049'); await runs.results(1); await runs.export(1, { executionStatus: 'error', verdict: 'none' }); await runs.remove(1)
|
||||
await reports.list(); await reports.get(1)
|
||||
expect(vi.mocked(api.request).mock.calls.map(([path]) => path)).toEqual([
|
||||
'/health', '/providers', '/providers/target', '/providers', '/providers/target',
|
||||
'/providers/target/check', '/providers/target/models', '/providers/target',
|
||||
'/runs?limit=50', '/runs/1', '/runs', '/runs/1', '/runs/1/resume',
|
||||
'/runs/1/retry-errors', '/runs/1/results/R0049/retry', '/runs/1/results', '/runs/1', '/reports?limit=50', '/reports/1',
|
||||
'/runs/1/retry-errors', '/runs/1/results/R0049/retry', '/runs/1/results', '/runs/1/export?execution_status=error&verdict=none', '/runs/1', '/reports?limit=50', '/reports/1',
|
||||
])
|
||||
expect(vi.mocked(api.request).mock.calls[10][1]).toMatchObject({ headers: { 'Idempotency-Key': idempotencyKey } })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user