From aa887096f9a305568dc3a846d0c9cdf7e45f1c67 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 25 Oct 2022 14:18:59 +0200 Subject: Correctly delete live files from object storage --- server/tests/api/live/live-permanent.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'server/tests/api/live/live-permanent.ts') diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts index 5d227200e..4203b1bfc 100644 --- a/server/tests/api/live/live-permanent.ts +++ b/server/tests/api/live/live-permanent.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import { expect } from 'chai' +import { checkLiveCleanup } from '@server/tests/shared' import { wait } from '@shared/core-utils' import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' import { @@ -129,6 +130,8 @@ describe('Permanent live', function () { expect(videoDetails.streamingPlaylists).to.have.lengthOf(0) } + + await checkLiveCleanup({ server: servers[0], permanent: true, videoUUID }) }) it('Should have set this live to waiting for live state', async function () { @@ -186,6 +189,15 @@ describe('Permanent live', function () { } }) + it('Should remove the live and have cleaned up the directory', async function () { + this.timeout(60000) + + await servers[0].videos.remove({ id: videoUUID }) + await waitJobs(servers) + + await checkLiveCleanup({ server: servers[0], permanent: true, videoUUID }) + }) + after(async function () { await cleanupTests(servers) }) -- cgit v1.2.3