diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-23 15:22:07 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-23 15:22:07 +0100 |
commit | 842a15732b5ddcd9c9c90e790a448235800ef870 (patch) | |
tree | 7654d22da45d4acaf1275641217b8ae700aa3610 /shared/extra-utils/server | |
parent | 0c8af7852175d7ef9934266a8537e035edbe23ec (diff) | |
download | PeerTube-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/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 | } |