diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-15 10:02:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch) | |
tree | da82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/live/live-permanent.ts | |
parent | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff) | |
download | PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip |
Introduce videos command
Diffstat (limited to 'server/tests/api/live/live-permanent.ts')
-rw-r--r-- | server/tests/api/live/live-permanent.ts | 11 |
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 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { LiveVideoCreate, VideoDetails, VideoPrivacy, VideoState } from '@shared/models' | 5 | import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' |
6 | import { | 6 | import { |
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 | }) |