X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-hls.ts;h=d050a7a7e29e36085ef514a25dbb4fe51a973989;hb=bf54587a3e2ad9c2c186828f2a5682b91ee2cc00;hp=4685bf3b613801275e5abda2bc100a9ad9ab6a7a;hpb=cbb1d46b917356f81e0dfe28aacee03031731960;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts index 4685bf3b6..d050a7a7e 100644 --- a/server/tests/api/videos/video-hls.ts +++ b/server/tests/api/videos/video-hls.ts @@ -14,13 +14,14 @@ import { createMultipleServers, doubleFollow, expectStartWith, + hlsInfohashExist, makeRawRequest, ObjectStorageCommand, PeerTubeServer, setAccessTokensToServers, waitJobs, webtorrentAdd -} from '@shared/extra-utils' +} from '@shared/server-commands' import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models' import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' @@ -88,9 +89,15 @@ async function checkHlsPlaylist (options: { const masterPlaylist = await server.streamingPlaylists.get({ url: hlsPlaylist.playlistUrl }) + let i = 0 for (const resolution of resolutions) { expect(masterPlaylist).to.contain(`${resolution}.m3u8`) expect(masterPlaylist).to.contain(`${resolution}.m3u8`) + + const url = 'http://' + videoDetails.account.host + await hlsInfohashExist(url, hlsPlaylist.playlistUrl, i) + + i++ } } @@ -236,6 +243,7 @@ describe('Test HLS videos', function () { enabled: true, allowAudioFiles: true, resolutions: { + '144p': false, '240p': true, '360p': true, '480p': true,