aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/create-import-video-file-job.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/create-import-video-file-job.ts')
-rw-r--r--server/tests/cli/create-import-video-file-job.ts17
1 files changed, 6 insertions, 11 deletions
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts
index 1472e60f6..13bcfd209 100644
--- a/server/tests/cli/create-import-video-file-job.ts
+++ b/server/tests/cli/create-import-video-file-job.ts
@@ -14,9 +14,9 @@ import {
14 killallServers, 14 killallServers,
15 ServerInfo, 15 ServerInfo,
16 setAccessTokensToServers, 16 setAccessTokensToServers,
17 uploadVideo, 17 uploadVideo
18 wait
19} from '../utils' 18} from '../utils'
19import { waitJobs } from '../utils/server/jobs'
20 20
21const expect = chai.expect 21const expect = chai.expect
22 22
@@ -54,14 +54,14 @@ describe('Test create import video jobs', function () {
54 video2UUID = res2.body.video.uuid 54 video2UUID = res2.body.video.uuid
55 55
56 // Transcoding 56 // Transcoding
57 await wait(40000) 57 await waitJobs(servers)
58 }) 58 })
59 59
60 it('Should run a import job on video 1 with a lower resolution', async function () { 60 it('Should run a import job on video 1 with a lower resolution', async function () {
61 const env = getEnvCli(servers[0]) 61 const env = getEnvCli(servers[0])
62 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm`) 62 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm`)
63 63
64 await wait(30000) 64 await waitJobs(servers)
65 65
66 let magnetUri: string 66 let magnetUri: string
67 for (const server of servers) { 67 for (const server of servers) {
@@ -85,7 +85,7 @@ describe('Test create import video jobs', function () {
85 const env = getEnvCli(servers[1]) 85 const env = getEnvCli(servers[1])
86 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv`) 86 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv`)
87 87
88 await wait(30000) 88 await waitJobs(servers)
89 89
90 let magnetUri: string 90 let magnetUri: string
91 for (const server of servers) { 91 for (const server of servers) {
@@ -111,7 +111,7 @@ describe('Test create import video jobs', function () {
111 const env = getEnvCli(servers[0]) 111 const env = getEnvCli(servers[0])
112 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm`) 112 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm`)
113 113
114 await wait(30000) 114 await waitJobs(servers)
115 115
116 let magnetUri: string 116 let magnetUri: string
117 for (const server of servers) { 117 for (const server of servers) {
@@ -133,10 +133,5 @@ describe('Test create import video jobs', function () {
133 133
134 after(async function () { 134 after(async function () {
135 killallServers(servers) 135 killallServers(servers)
136
137 // Keep the logs if the test failed
138 if (this['ok']) {
139 await flushTests()
140 }
141 }) 136 })
142}) 137})