From 25378bc866a69002d7447e5edc254ec7e469a1ec Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Oct 2018 16:43:57 +0200 Subject: Delete correctly redundancy files --- server/tests/api/server/redundancy.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'server/tests/api') diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts index d60319657..1960854b6 100644 --- a/server/tests/api/server/redundancy.ts +++ b/server/tests/api/server/redundancy.ts @@ -16,7 +16,8 @@ import { uploadVideo, viewVideo, wait, - waitUntilLog + waitUntilLog, + checkVideoFilesWereRemoved, removeVideo } from '../../utils' import { waitJobs } from '../../utils/server/jobs' import * as magnetUtil from 'magnet-uri' @@ -242,6 +243,8 @@ describe('Test videos redundancy', function () { await wait(5000) await check1WebSeed(strategy) + + await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].serverNumber, [ 'videos' ]) }) after(function () { @@ -287,6 +290,8 @@ describe('Test videos redundancy', function () { await wait(5000) await check1WebSeed(strategy) + + await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].serverNumber, [ 'videos' ]) }) after(function () { @@ -344,6 +349,18 @@ describe('Test videos redundancy', function () { await checkStatsWith2Webseed(strategy) }) + it('Should remove the video and the redundancy files', async function () { + this.timeout(20000) + + await removeVideo(servers[1].url, servers[1].accessToken, video1Server2UUID) + + await waitJobs(servers) + + for (const server of servers) { + await checkVideoFilesWereRemoved(video1Server2UUID, server.serverNumber) + } + }) + after(function () { return cleanServers() }) -- cgit v1.2.3