test: align container flow acceptance identities

This commit is contained in:
2026-08-14 22:30:28 +08:00
parent 8aa58a4f72
commit 011c30cc09
5 changed files with 29 additions and 10 deletions
@@ -72,11 +72,17 @@ export async function run(context) {
['evidenceId', 'fileId', 'status', 'downloadPath'].every((field) => photo[field] !== undefined),
`fileId=${id(photo.fileId)}`, OPTIONS)
const downloadPath = String(photo.downloadPath || '')
if (photo.status === 'VOID') {
context.assert(MODULE, `overview PDA 作废照片 ${index + 1} 无下载入口`, overviewResponse,
!downloadPath,
`fileId=${id(photo.fileId)}, status=${photo.status}, downloadPath=${downloadPath || 'none'}`, OPTIONS)
continue
}
const controlledPath = downloadPath.startsWith('/api/')
&& !downloadPath.startsWith('//') && !downloadPath.includes('://')
if (!controlledPath) {
if (photo.status !== 'ACTIVE' || !controlledPath) {
context.assert(MODULE, `overview PDA 照片 ${index + 1} 下载路径受控`, overviewResponse, false,
`fileId=${id(photo.fileId)}, downloadPath=${downloadPath || 'missing'}`, OPTIONS)
`fileId=${id(photo.fileId)}, status=${photo.status || 'missing'}, downloadPath=${downloadPath || 'missing'}`, OPTIONS)
continue
}
const download = await context.requestBinary('GET', downloadPath)