X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fshared%2Flive.ts;h=6ee4899b035b9442147336b79e46b433b4261d04;hb=9295c68b74fe1f1e2e9f72009205d7f0379844c5;hp=72e3e27f61e21143a15a3c452c8b9bcefc65114b;hpb=3318147300b4f998adf728eb0a5a14a4c1829c51;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/shared/live.ts b/server/tests/shared/live.ts index 72e3e27f6..6ee4899b0 100644 --- a/server/tests/shared/live.ts +++ b/server/tests/shared/live.ts @@ -5,11 +5,11 @@ import { pathExists, readdir } from 'fs-extra' import { join } from 'path' import { PeerTubeServer } from '@shared/server-commands' -async function checkLiveCleanupAfterSave (server: PeerTubeServer, videoUUID: string, resolutions: number[] = []) { +async function checkLiveCleanup (server: PeerTubeServer, videoUUID: string, savedResolutions: number[] = []) { const basePath = server.servers.buildDirectory('streaming-playlists') const hlsPath = join(basePath, 'hls', videoUUID) - if (resolutions.length === 0) { + if (savedResolutions.length === 0) { const result = await pathExists(hlsPath) expect(result).to.be.false @@ -19,9 +19,9 @@ async function checkLiveCleanupAfterSave (server: PeerTubeServer, videoUUID: str const files = await readdir(hlsPath) // fragmented file and playlist per resolution + master playlist + segments sha256 json file - expect(files).to.have.lengthOf(resolutions.length * 2 + 2) + expect(files).to.have.lengthOf(savedResolutions.length * 2 + 2) - for (const resolution of resolutions) { + for (const resolution of savedResolutions) { const fragmentedFile = files.find(f => f.endsWith(`-${resolution}-fragmented.mp4`)) expect(fragmentedFile).to.exist @@ -37,5 +37,5 @@ async function checkLiveCleanupAfterSave (server: PeerTubeServer, videoUUID: str } export { - checkLiveCleanupAfterSave + checkLiveCleanup }