aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-03 16:43:57 +0200
committerChocobozzz <me@florianbigard.com>2018-10-03 16:43:57 +0200
commit25378bc866a69002d7447e5edc254ec7e469a1ec (patch)
treefd12d97cb571de83b1281554baba9c28606eaab9 /server/tests/utils/videos
parentbe691a57c590348fd36d6e11dc1fe4cc8eaa0719 (diff)
downloadPeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.gz
PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.zst
PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.zip
Delete correctly redundancy files
Diffstat (limited to 'server/tests/utils/videos')
-rw-r--r--server/tests/utils/videos/videos.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index 7eee25402..87c385f38 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -267,10 +267,14 @@ function removeVideo (url: string, token: string, id: number | string, expectedS
267 .expect(expectedStatus) 267 .expect(expectedStatus)
268} 268}
269 269
270async function checkVideoFilesWereRemoved (videoUUID: string, serverNumber: number) { 270async function checkVideoFilesWereRemoved (
271 videoUUID: string,
272 serverNumber: number,
273 directories = [ 'videos', 'thumbnails', 'torrents', 'previews', 'captions' ]
274) {
271 const testDirectory = 'test' + serverNumber 275 const testDirectory = 'test' + serverNumber
272 276
273 for (const directory of [ 'videos', 'thumbnails', 'torrents', 'previews', 'captions' ]) { 277 for (const directory of directories) {
274 const directoryPath = join(root(), testDirectory, directory) 278 const directoryPath = join(root(), testDirectory, directory)
275 279
276 const directoryExists = existsSync(directoryPath) 280 const directoryExists = existsSync(directoryPath)