aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live-permanent.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/live/live-permanent.ts')
-rw-r--r--server/tests/api/live/live-permanent.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts
index 6f4915a6b..707f2edf8 100644
--- a/server/tests/api/live/live-permanent.ts
+++ b/server/tests/api/live/live-permanent.ts
@@ -2,13 +2,12 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { LiveVideoCreate, VideoDetails, VideoPrivacy, VideoState } from '@shared/models' 5import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 ConfigCommand, 8 ConfigCommand,
9 doubleFollow, 9 doubleFollow,
10 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
11 getVideo,
12 ServerInfo, 11 ServerInfo,
13 setAccessTokensToServers, 12 setAccessTokensToServers,
14 setDefaultVideoChannel, 13 setDefaultVideoChannel,
@@ -38,8 +37,8 @@ describe('Permanent live', function () {
38 37
39 async function checkVideoState (videoId: string, state: VideoState) { 38 async function checkVideoState (videoId: string, state: VideoState) {
40 for (const server of servers) { 39 for (const server of servers) {
41 const res = await getVideo(server.url, videoId) 40 const video = await server.videosCommand.get({ id: videoId })
42 expect((res.body as VideoDetails).state.id).to.equal(state) 41 expect(video.state.id).to.equal(state)
43 } 42 }
44 } 43 }
45 44
@@ -123,9 +122,7 @@ describe('Permanent live', function () {
123 await waitJobs(servers) 122 await waitJobs(servers)
124 123
125 for (const server of servers) { 124 for (const server of servers) {
126 const res = await getVideo(server.url, videoUUID) 125 const videoDetails = await server.videosCommand.get({ id: videoUUID })
127
128 const videoDetails = res.body as VideoDetails
129 expect(videoDetails.streamingPlaylists).to.have.lengthOf(1) 126 expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
130 } 127 }
131 }) 128 })