diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-03 16:43:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-03 16:43:57 +0200 |
commit | 25378bc866a69002d7447e5edc254ec7e469a1ec (patch) | |
tree | fd12d97cb571de83b1281554baba9c28606eaab9 /server/tests/utils/videos/videos.ts | |
parent | be691a57c590348fd36d6e11dc1fe4cc8eaa0719 (diff) | |
download | PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.gz PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.zst PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.zip |
Delete correctly redundancy files
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-rw-r--r-- | server/tests/utils/videos/videos.ts | 8 |
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 | ||
270 | async function checkVideoFilesWereRemoved (videoUUID: string, serverNumber: number) { | 270 | async 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) |