aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-channels.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/video-channels.ts')
-rw-r--r--server/tests/api/videos/video-channels.ts16
1 files changed, 6 insertions, 10 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 7ae505fd7..ad543e2d6 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -3,7 +3,7 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { User, Video } from '../../../../shared/index' 5import { User, Video } from '../../../../shared/index'
6import { doubleFollow, flushAndRunMultipleServers, getVideoChannelVideos, updateVideo, uploadVideo, wait } from '../../utils' 6import { doubleFollow, flushAndRunMultipleServers, getVideoChannelVideos, updateVideo, uploadVideo } from '../../utils'
7import { 7import {
8 addVideoChannel, 8 addVideoChannel,
9 deleteVideoChannel, 9 deleteVideoChannel,
@@ -17,6 +17,7 @@ import {
17 setAccessTokensToServers, 17 setAccessTokensToServers,
18 updateVideoChannel 18 updateVideoChannel
19} from '../../utils/index' 19} from '../../utils/index'
20import { waitJobs } from '../../utils/server/jobs'
20 21
21const expect = chai.expect 22const expect = chai.expect
22 23
@@ -49,7 +50,7 @@ describe('Test video channels', function () {
49 firstVideoChannelUUID = user.videoChannels[0].uuid 50 firstVideoChannelUUID = user.videoChannels[0].uuid
50 } 51 }
51 52
52 await wait(5000) 53 await waitJobs(servers)
53 }) 54 })
54 55
55 it('Should have one video channel (created with root)', async () => { 56 it('Should have one video channel (created with root)', async () => {
@@ -80,7 +81,7 @@ describe('Test video channels', function () {
80 videoUUID = res.body.video.uuid 81 videoUUID = res.body.video.uuid
81 } 82 }
82 83
83 await wait(3000) 84 await waitJobs(servers)
84 }) 85 })
85 86
86 it('Should have two video channels when getting my information', async () => { 87 it('Should have two video channels when getting my information', async () => {
@@ -142,7 +143,7 @@ describe('Test video channels', function () {
142 143
143 await updateVideoChannel(servers[0].url, servers[0].accessToken, secondVideoChannelId, videoChannelAttributes) 144 await updateVideoChannel(servers[0].url, servers[0].accessToken, secondVideoChannelId, videoChannelAttributes)
144 145
145 await wait(3000) 146 await waitJobs(servers)
146 }) 147 })
147 148
148 it('Should have video channel updated', async function () { 149 it('Should have video channel updated', async function () {
@@ -184,7 +185,7 @@ describe('Test video channels', function () {
184 185
185 await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, { channelId: firstVideoChannelId }) 186 await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, { channelId: firstVideoChannelId })
186 187
187 await wait(5000) 188 await waitJobs(servers)
188 }) 189 })
189 190
190 it('Should list the first video channel videos', async function () { 191 it('Should list the first video channel videos', async function () {
@@ -219,10 +220,5 @@ describe('Test video channels', function () {
219 220
220 after(async function () { 221 after(async function () {
221 killallServers(servers) 222 killallServers(servers)
222
223 // Keep the logs if the test failed
224 if (this['ok']) {
225 await flushTests()
226 }
227 }) 223 })
228}) 224})