diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-04 14:16:57 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | 68e70a745b2010cd0199864a2addd60d8f99c732 (patch) | |
tree | a0b1b061d205321e0f6eb80e5b44d7afd06aab14 /shared/extra-utils/videos/videos.ts | |
parent | 97969c4edf51b37eee691adba43368bb0fbb729b (diff) | |
download | PeerTube-68e70a745b2010cd0199864a2addd60d8f99c732.tar.gz PeerTube-68e70a745b2010cd0199864a2addd60d8f99c732.tar.zst PeerTube-68e70a745b2010cd0199864a2addd60d8f99c732.zip |
Add save replay live tests
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
312 | .expect(expectedStatus) | 312 | .expect(expectedStatus) |
313 | } | 313 | } |
314 | 314 | ||
315 | async function removeAllVideos (server: ServerInfo) { | ||
316 | const resVideos = await getVideosList(server.url) | ||
317 | |||
318 | for (const v of resVideos.body.data) { | ||
319 | await removeVideo(server.url, server.accessToken, v.id) | ||
320 | } | ||
321 | } | ||
322 | |||
315 | async function checkVideoFilesWereRemoved ( | 323 | async function checkVideoFilesWereRemoved ( |
316 | videoUUID: string, | 324 | videoUUID: string, |
317 | serverNumber: number, | 325 | serverNumber: number, |
@@ -685,6 +693,7 @@ export { | |||
685 | getVideoFileMetadataUrl, | 693 | getVideoFileMetadataUrl, |
686 | getVideoWithToken, | 694 | getVideoWithToken, |
687 | getVideosList, | 695 | getVideosList, |
696 | removeAllVideos, | ||
688 | getVideosListPagination, | 697 | getVideosListPagination, |
689 | getVideosListSort, | 698 | getVideosListSort, |
690 | removeVideo, | 699 | removeVideo, |