From 68e70a745b2010cd0199864a2addd60d8f99c732 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 4 Nov 2020 14:16:57 +0100 Subject: Add save replay live tests --- shared/extra-utils/videos/videos.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'shared/extra-utils/videos/videos.ts') diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 2f7f2182c..29a646541 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts @@ -312,6 +312,14 @@ function removeVideo (url: string, token: string, id: number | string, expectedS .expect(expectedStatus) } +async function removeAllVideos (server: ServerInfo) { + const resVideos = await getVideosList(server.url) + + for (const v of resVideos.body.data) { + await removeVideo(server.url, server.accessToken, v.id) + } +} + async function checkVideoFilesWereRemoved ( videoUUID: string, serverNumber: number, @@ -685,6 +693,7 @@ export { getVideoFileMetadataUrl, getVideoWithToken, getVideosList, + removeAllVideos, getVideosListPagination, getVideosListSort, removeVideo, -- cgit v1.2.3