aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-23 15:22:07 +0100
committerChocobozzz <me@florianbigard.com>2021-11-23 15:22:07 +0100
commit842a15732b5ddcd9c9c90e790a448235800ef870 (patch)
tree7654d22da45d4acaf1275641217b8ae700aa3610 /shared/extra-utils
parent0c8af7852175d7ef9934266a8537e035edbe23ec (diff)
downloadPeerTube-842a15732b5ddcd9c9c90e790a448235800ef870.tar.gz
PeerTube-842a15732b5ddcd9c9c90e790a448235800ef870.tar.zst
PeerTube-842a15732b5ddcd9c9c90e790a448235800ef870.zip
Ensure we don't run transcoding after import file
Diffstat (limited to 'shared/extra-utils')
-rw-r--r--shared/extra-utils/server/jobs.ts9
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
2import { expect } from 'chai'
2import { JobState, JobType } from '../../models' 3import { JobState, JobType } from '../../models'
3import { wait } from '../miscs' 4import { wait } from '../miscs'
4import { PeerTubeServer } from './server' 5import { PeerTubeServer } from './server'
@@ -70,8 +71,14 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela
70 } while (pendingRequests) 71 } while (pendingRequests)
71} 72}
72 73
74async 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
75export { 81export {
76 waitJobs 82 waitJobs,
83 expectNoFailedTranscodingJob
77} 84}