aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/create-transcoding-job.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/create-transcoding-job.ts')
-rw-r--r--server/tests/cli/create-transcoding-job.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index c85130fef..b90e9bde9 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -14,7 +14,7 @@ import {
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 waitJobs 15 waitJobs
16} from '@shared/server-commands' 16} from '@shared/server-commands'
17import { expectStartWith } from '../shared' 17import { checkResolutionsInMasterPlaylist, expectStartWith } from '../shared'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
@@ -163,11 +163,18 @@ function runTests (objectStorage: boolean) {
163 163
164 expect(videoDetails.streamingPlaylists).to.have.lengthOf(1) 164 expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
165 165
166 const files = videoDetails.streamingPlaylists[0].files 166 const hlsPlaylist = videoDetails.streamingPlaylists[0]
167
168 const files = hlsPlaylist.files
167 expect(files).to.have.lengthOf(1) 169 expect(files).to.have.lengthOf(1)
168 expect(files[0].resolution.id).to.equal(480) 170 expect(files[0].resolution.id).to.equal(480)
169 171
170 if (objectStorage) await checkFilesInObjectStorage(files, 'playlist') 172 if (objectStorage) {
173 await checkFilesInObjectStorage(files, 'playlist')
174
175 const resolutions = files.map(f => f.resolution.id)
176 await checkResolutionsInMasterPlaylist({ server, playlistUrl: hlsPlaylist.playlistUrl, resolutions })
177 }
171 } 178 }
172 }) 179 })
173 180