From 842a15732b5ddcd9c9c90e790a448235800ef870 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Nov 2021 15:22:07 +0100 Subject: Ensure we don't run transcoding after import file --- shared/extra-utils/server/jobs.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/server') diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts index afaaa5cd6..34fefd444 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/extra-utils/server/jobs.ts @@ -1,4 +1,5 @@ +import { expect } from 'chai' import { JobState, JobType } from '../../models' import { wait } from '../miscs' import { PeerTubeServer } from './server' @@ -70,8 +71,14 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela } while (pendingRequests) } +async function expectNoFailedTranscodingJob (server: PeerTubeServer) { + const { data } = await server.jobs.listFailed({ jobType: 'video-transcoding' }) + expect(data).to.have.lengthOf(0) +} + // --------------------------------------------------------------------------- export { - waitJobs + waitJobs, + expectNoFailedTranscodingJob } -- cgit v1.2.3