aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/videos/video-create-transcoding.ts25
1 files changed, 24 insertions, 1 deletions
diff --git a/server/tests/api/videos/video-create-transcoding.ts b/server/tests/api/videos/video-create-transcoding.ts
index 62a6bab0d..dcdbd9c6e 100644
--- a/server/tests/api/videos/video-create-transcoding.ts
+++ b/server/tests/api/videos/video-create-transcoding.ts
@@ -25,7 +25,11 @@ async function checkFilesInObjectStorage (video: VideoDetails) {
25 await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200) 25 await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200)
26 } 26 }
27 27
28 for (const file of video.streamingPlaylists[0].files) { 28 const streamingPlaylistFiles = video.streamingPlaylists.length === 0
29 ? []
30 : video.streamingPlaylists[0].files
31
32 for (const file of streamingPlaylistFiles) {
29 expectStartWith(file.fileUrl, ObjectStorageCommand.getPlaylistBaseUrl()) 33 expectStartWith(file.fileUrl, ObjectStorageCommand.getPlaylistBaseUrl())
30 await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200) 34 await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200)
31 } 35 }
@@ -127,6 +131,25 @@ function runTests (objectStorage: boolean) {
127 } 131 }
128 }) 132 })
129 133
134 it('Should only generate WebTorrent', async function () {
135 this.timeout(60000)
136
137 await servers[0].videos.removeHLSFiles({ videoId: videoUUID })
138 await waitJobs(servers)
139
140 await servers[0].videos.runTranscoding({ videoId: videoUUID, transcodingType: 'webtorrent' })
141 await waitJobs(servers)
142
143 for (const server of servers) {
144 const videoDetails = await server.videos.get({ id: videoUUID })
145
146 expect(videoDetails.files).to.have.lengthOf(5)
147 expect(videoDetails.streamingPlaylists).to.have.lengthOf(0)
148
149 if (objectStorage) await checkFilesInObjectStorage(videoDetails)
150 }
151 })
152
130 it('Should not have updated published at attributes', async function () { 153 it('Should not have updated published at attributes', async function () {
131 const video = await servers[0].videos.get({ id: videoUUID }) 154 const video = await servers[0].videos.get({ id: videoUUID })
132 155