feat: add workflow orchestration and media governance
This commit is contained in:
@@ -53,6 +53,14 @@ try {
|
||||
const artifacts = await request(`/api/production/media-artifacts?jobId=${encodeURIComponent(jobId)}`, { headers });
|
||||
assert.equal(artifacts.response.ok, true, "media artifact API must be readable");
|
||||
assert.equal(artifacts.payload.artifacts?.[0]?.job_id, jobId, "artifact must be linked to the generation job");
|
||||
const artifactId = artifacts.payload.artifacts[0].id;
|
||||
const contentResponse = await fetch(`${api}/api/production/media-artifacts/${encodeURIComponent(artifactId)}/content`, { headers });
|
||||
assert.equal(contentResponse.ok, true, "media artifact content must be readable within the project scope");
|
||||
assert.match(contentResponse.headers.get("content-type") || "", /video\/mp4/, "artifact preview must preserve video content type");
|
||||
assert.ok((await contentResponse.arrayBuffer()).byteLength > 0, "artifact preview body must not be empty");
|
||||
const frameResponse = await fetch(`${api}/api/production/media-artifacts/${encodeURIComponent(artifactId)}/content?frame=last`, { headers });
|
||||
assert.equal(frameResponse.ok, true, "actual last-frame preview must be readable");
|
||||
assert.match(frameResponse.headers.get("content-type") || "", /image\/jpeg/, "last-frame preview must be JPEG");
|
||||
console.log(`api media smoke passed: ${jobId} -> ${artifacts.payload.artifacts[0].last_frame_path}`);
|
||||
} finally {
|
||||
for (const jobId of createdJobIds) {
|
||||
|
||||
Reference in New Issue
Block a user