aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-19 11:23:51 +0100
committerChocobozzz <me@florianbigard.com>2021-02-19 11:27:38 +0100
commit300cb723eb9bd219e6d381c57a8a6a860563bbbb (patch)
tree4af4b272d174c195c81285ad49325c4e7a2f7707 /server/tests
parent2a021e6cb6836864bb013d5ff451e8a4ae45c9b7 (diff)
downloadPeerTube-300cb723eb9bd219e6d381c57a8a6a860563bbbb.tar.gz
PeerTube-300cb723eb9bd219e6d381c57a8a6a860563bbbb.tar.zst
PeerTube-300cb723eb9bd219e6d381c57a8a6a860563bbbb.zip
Fix tests
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/live/live-constraints.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts
index 1c60a7c76..5569e6066 100644
--- a/server/tests/api/live/live-constraints.ts
+++ b/server/tests/api/live/live-constraints.ts
@@ -20,7 +20,8 @@ import {
20 updateUser, 20 updateUser,
21 userLogin, 21 userLogin,
22 wait, 22 wait,
23 waitJobs 23 waitJobs,
24 waitUntilLivePublished
24} from '../../../../shared/extra-utils' 25} from '../../../../shared/extra-utils'
25 26
26const expect = chai.expect 27const expect = chai.expect
@@ -55,6 +56,12 @@ describe('Test live constraints', function () {
55 await checkLiveCleanup(servers[0], videoId, resolutions) 56 await checkLiveCleanup(servers[0], videoId, resolutions)
56 } 57 }
57 58
59 async function waitUntilLivePublishedOnAllServers (videoId: string) {
60 for (const server of servers) {
61 await waitUntilLivePublished(server.url, server.accessToken, videoId)
62 }
63 }
64
58 before(async function () { 65 before(async function () {
59 this.timeout(120000) 66 this.timeout(120000)
60 67
@@ -118,6 +125,7 @@ describe('Test live constraints', function () {
118 const userVideoLiveoId = await createLiveWrapper(true) 125 const userVideoLiveoId = await createLiveWrapper(true)
119 await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true) 126 await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
120 127
128 await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
121 await waitJobs(servers) 129 await waitJobs(servers)
122 130
123 await checkSaveReplay(userVideoLiveoId) 131 await checkSaveReplay(userVideoLiveoId)
@@ -140,6 +148,7 @@ describe('Test live constraints', function () {
140 const userVideoLiveoId = await createLiveWrapper(true) 148 const userVideoLiveoId = await createLiveWrapper(true)
141 await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true) 149 await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
142 150
151 await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
143 await waitJobs(servers) 152 await waitJobs(servers)
144 153
145 await checkSaveReplay(userVideoLiveoId) 154 await checkSaveReplay(userVideoLiveoId)
@@ -189,6 +198,7 @@ describe('Test live constraints', function () {
189 const userVideoLiveoId = await createLiveWrapper(true) 198 const userVideoLiveoId = await createLiveWrapper(true)
190 await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true) 199 await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
191 200
201 await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
192 await waitJobs(servers) 202 await waitJobs(servers)
193 203
194 await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240 ]) 204 await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240 ])