X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-hls.ts;h=22031c18bf0f61e84a457d2e0ee2c442298c431c;hb=da3a3ab6829107b3ed7f18dda42648dfde41871d;hp=a1214bad165b5d46d9152625bf9b90fa310cc90c;hpb=b718fd22374d64534bcfe69932cf562894abed6a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts index a1214bad1..22031c18b 100644 --- a/server/tests/api/videos/video-hls.ts +++ b/server/tests/api/videos/video-hls.ts @@ -5,7 +5,7 @@ import 'mocha' import { checkDirectoryIsEmpty, checkSegmentHash, - checkTmpIsEmpty, + checkTmpIsEmpty, cleanupTests, doubleFollow, flushAndRunMultipleServers, flushTests, @@ -18,7 +18,7 @@ import { updateVideo, uploadVideo, waitJobs -} from '../../../../shared/utils' +} from '../../../../shared/extra-utils' import { VideoDetails } from '../../../../shared/models/videos' import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' import { join } from 'path' @@ -51,7 +51,7 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string) { { for (const resolution of resolutions) { - const res2 = await getPlaylist(`http://localhost:9001/static/playlists/hls/${videoUUID}/${resolution}.m3u8`) + const res2 = await getPlaylist(`http://localhost:9001/static/streaming-playlists/hls/${videoUUID}/${resolution}.m3u8`) const subPlaylist = res2.text expect(subPlaylist).to.contain(`${videoUUID}-${resolution}-fragmented.mp4`) @@ -59,7 +59,7 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string) { } { - const baseUrl = 'http://localhost:9001/static/playlists/hls' + const baseUrl = 'http://localhost:9001/static/streaming-playlists/hls' for (const resolution of resolutions) { await checkSegmentHash(baseUrl, baseUrl, videoUUID, resolution, hlsPlaylist) @@ -118,7 +118,7 @@ describe('Test HLS videos', function () { it('Should have the playlists/segment deleted from the disk', async function () { for (const server of servers) { await checkDirectoryIsEmpty(server, 'videos') - await checkDirectoryIsEmpty(server, join('playlists', 'hls')) + await checkDirectoryIsEmpty(server, join('streaming-playlists', 'hls')) } }) @@ -129,11 +129,6 @@ describe('Test HLS videos', function () { }) after(async function () { - killallServers(servers) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } + await cleanupTests(servers) }) })