diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-01 14:19:44 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-01 14:19:44 +0100 |
commit | a2caee9f5162232234de2e8aae6957cc7f38c853 (patch) | |
tree | f6ca87b03ed80ca4b6625a7b2b31706cd4f831ad /server/tests/cli/create-transcoding-job.ts | |
parent | 0f11ec8dd32b50897c18588db948e96cf0fc2c70 (diff) | |
download | PeerTube-a2caee9f5162232234de2e8aae6957cc7f38c853.tar.gz PeerTube-a2caee9f5162232234de2e8aae6957cc7f38c853.tar.zst PeerTube-a2caee9f5162232234de2e8aae6957cc7f38c853.zip |
Fix HLS re transcoding with object storage enabled
Diffstat (limited to 'server/tests/cli/create-transcoding-job.ts')
-rw-r--r-- | server/tests/cli/create-transcoding-job.ts | 13 |
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' |
17 | import { expectStartWith } from '../shared' | 17 | import { checkResolutionsInMasterPlaylist, expectStartWith } from '../shared' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const 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 | ||