aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live-constraints.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-15 10:02:54 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitd23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch)
treeda82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/live/live-constraints.ts
parent7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff)
downloadPeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip
Introduce videos command
Diffstat (limited to 'server/tests/api/live/live-constraints.ts')
-rw-r--r--server/tests/api/live/live-constraints.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts
index 290d325d4..7900b1abe 100644
--- a/server/tests/api/live/live-constraints.ts
+++ b/server/tests/api/live/live-constraints.ts
@@ -2,14 +2,13 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { VideoDetails, VideoPrivacy } from '@shared/models' 5import { VideoPrivacy } from '@shared/models'
6import { 6import {
7 checkLiveCleanup, 7 checkLiveCleanup,
8 cleanupTests, 8 cleanupTests,
9 ConfigCommand, 9 ConfigCommand,
10 doubleFollow, 10 doubleFollow,
11 flushAndRunMultipleServers, 11 flushAndRunMultipleServers,
12 getVideo,
13 ServerInfo, 12 ServerInfo,
14 setAccessTokensToServers, 13 setAccessTokensToServers,
15 setDefaultVideoChannel, 14 setDefaultVideoChannel,
@@ -39,9 +38,7 @@ describe('Test live constraints', function () {
39 38
40 async function checkSaveReplay (videoId: string, resolutions = [ 720 ]) { 39 async function checkSaveReplay (videoId: string, resolutions = [ 720 ]) {
41 for (const server of servers) { 40 for (const server of servers) {
42 const res = await getVideo(server.url, videoId) 41 const video = await server.videosCommand.get({ id: videoId })
43
44 const video: VideoDetails = res.body
45 expect(video.isLive).to.be.false 42 expect(video.isLive).to.be.false
46 expect(video.duration).to.be.greaterThan(0) 43 expect(video.duration).to.be.greaterThan(0)
47 } 44 }