aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live-permanent.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-08 10:25:50 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit04aed76711909507e74905bde3a7fa024d3585c9 (patch)
treeda93912bb9331feda40f597da3fea7dc24970d66 /server/tests/api/live/live-permanent.ts
parentd897210c2db1ca2acc1e7b28a13127647ab2222c (diff)
downloadPeerTube-04aed76711909507e74905bde3a7fa024d3585c9.tar.gz
PeerTube-04aed76711909507e74905bde3a7fa024d3585c9.tar.zst
PeerTube-04aed76711909507e74905bde3a7fa024d3585c9.zip
Shorter live methods
Diffstat (limited to 'server/tests/api/live/live-permanent.ts')
-rw-r--r--server/tests/api/live/live-permanent.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts
index a0f70dfdb..6f4915a6b 100644
--- a/server/tests/api/live/live-permanent.ts
+++ b/server/tests/api/live/live-permanent.ts
@@ -32,7 +32,7 @@ describe('Permanent live', function () {
32 permanentLive 32 permanentLive
33 } 33 }
34 34
35 const { uuid } = await servers[0].liveCommand.createLive({ fields: attributes }) 35 const { uuid } = await servers[0].liveCommand.create({ fields: attributes })
36 return uuid 36 return uuid
37 } 37 }
38 38
@@ -76,14 +76,14 @@ describe('Permanent live', function () {
76 const videoUUID = await createLiveWrapper(false) 76 const videoUUID = await createLiveWrapper(false)
77 77
78 { 78 {
79 const live = await servers[0].liveCommand.getLive({ videoId: videoUUID }) 79 const live = await servers[0].liveCommand.get({ videoId: videoUUID })
80 expect(live.permanentLive).to.be.false 80 expect(live.permanentLive).to.be.false
81 } 81 }
82 82
83 await servers[0].liveCommand.updateLive({ videoId: videoUUID, fields: { permanentLive: true } }) 83 await servers[0].liveCommand.update({ videoId: videoUUID, fields: { permanentLive: true } })
84 84
85 { 85 {
86 const live = await servers[0].liveCommand.getLive({ videoId: videoUUID }) 86 const live = await servers[0].liveCommand.get({ videoId: videoUUID })
87 expect(live.permanentLive).to.be.true 87 expect(live.permanentLive).to.be.true
88 } 88 }
89 }) 89 })
@@ -93,7 +93,7 @@ describe('Permanent live', function () {
93 93
94 videoUUID = await createLiveWrapper(true) 94 videoUUID = await createLiveWrapper(true)
95 95
96 const live = await servers[0].liveCommand.getLive({ videoId: videoUUID }) 96 const live = await servers[0].liveCommand.get({ videoId: videoUUID })
97 expect(live.permanentLive).to.be.true 97 expect(live.permanentLive).to.be.true
98 98
99 await waitJobs(servers) 99 await waitJobs(servers)
@@ -105,13 +105,13 @@ describe('Permanent live', function () {
105 const ffmpegCommand = await servers[0].liveCommand.sendRTMPStreamInVideo({ videoId: videoUUID }) 105 const ffmpegCommand = await servers[0].liveCommand.sendRTMPStreamInVideo({ videoId: videoUUID })
106 106
107 for (const server of servers) { 107 for (const server of servers) {
108 await server.liveCommand.waitUntilLivePublished({ videoId: videoUUID }) 108 await server.liveCommand.waitUntilPublished({ videoId: videoUUID })
109 } 109 }
110 110
111 await checkVideoState(videoUUID, VideoState.PUBLISHED) 111 await checkVideoState(videoUUID, VideoState.PUBLISHED)
112 112
113 await stopFfmpeg(ffmpegCommand) 113 await stopFfmpeg(ffmpegCommand)
114 await servers[0].liveCommand.waitUntilLiveWaiting({ videoId: videoUUID }) 114 await servers[0].liveCommand.waitUntilWaiting({ videoId: videoUUID })
115 115
116 await waitJobs(servers) 116 await waitJobs(servers)
117 }) 117 })
@@ -156,12 +156,12 @@ describe('Permanent live', function () {
156 const ffmpegCommand = await servers[0].liveCommand.sendRTMPStreamInVideo({ videoId: videoUUID }) 156 const ffmpegCommand = await servers[0].liveCommand.sendRTMPStreamInVideo({ videoId: videoUUID })
157 157
158 for (const server of servers) { 158 for (const server of servers) {
159 await server.liveCommand.waitUntilLivePublished({ videoId: videoUUID }) 159 await server.liveCommand.waitUntilPublished({ videoId: videoUUID })
160 } 160 }
161 161
162 await checkVideoState(videoUUID, VideoState.PUBLISHED) 162 await checkVideoState(videoUUID, VideoState.PUBLISHED)
163 163
164 const count = await servers[0].liveCommand.getPlaylistsCount({ videoUUID }) 164 const count = await servers[0].liveCommand.countPlaylists({ videoUUID })
165 // master playlist and 720p playlist 165 // master playlist and 720p playlist
166 expect(count).to.equal(2) 166 expect(count).to.equal(2)
167 167