diff options
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/jobs.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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 @@ | |||
1 | 1 | ||
2 | import { expect } from 'chai' | ||
2 | import { JobState, JobType } from '../../models' | 3 | import { JobState, JobType } from '../../models' |
3 | import { wait } from '../miscs' | 4 | import { wait } from '../miscs' |
4 | import { PeerTubeServer } from './server' | 5 | import { PeerTubeServer } from './server' |
@@ -70,8 +71,14 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela | |||
70 | } while (pendingRequests) | 71 | } while (pendingRequests) |
71 | } | 72 | } |
72 | 73 | ||
74 | async function expectNoFailedTranscodingJob (server: PeerTubeServer) { | ||
75 | const { data } = await server.jobs.listFailed({ jobType: 'video-transcoding' }) | ||
76 | expect(data).to.have.lengthOf(0) | ||
77 | } | ||
78 | |||
73 | // --------------------------------------------------------------------------- | 79 | // --------------------------------------------------------------------------- |
74 | 80 | ||
75 | export { | 81 | export { |
76 | waitJobs | 82 | waitJobs, |
83 | expectNoFailedTranscodingJob | ||
77 | } | 84 | } |