From 4ec52d04dcc5d664612331f8e08d7d90da990415 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Apr 2022 09:06:52 +0200 Subject: Add ability to save replay of permanent lives --- server/tests/shared/live.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/tests/shared') 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 } -- cgit v1.2.3