diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-22 14:28:03 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-07-26 11:29:31 +0200 |
commit | 83903cb65d531a6b6b91715387493ba8312b264d (patch) | |
tree | fd172e26a483331e74f15a062743a9d40d4016d3 /server/tests/api/videos/multiple-servers.ts | |
parent | c4fa01f7c45b66b112ebd08abce744b7c4041feb (diff) | |
download | PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.tar.gz PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.tar.zst PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.zip |
Generate random uuid for video files
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index d916abb09..f9220e4b3 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -13,6 +13,7 @@ import { | |||
13 | dateIsValid, | 13 | dateIsValid, |
14 | doubleFollow, | 14 | doubleFollow, |
15 | PeerTubeServer, | 15 | PeerTubeServer, |
16 | saveVideoInServers, | ||
16 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
17 | testImage, | 18 | testImage, |
18 | wait, | 19 | wait, |
@@ -661,19 +662,19 @@ describe('Test multiple servers', function () { | |||
661 | } | 662 | } |
662 | }) | 663 | }) |
663 | 664 | ||
664 | it('Should remove the videos 3 and 3-2 by asking server 3', async function () { | 665 | it('Should remove the videos 3 and 3-2 by asking server 3 and correctly delete files', async function () { |
665 | this.timeout(10000) | 666 | this.timeout(30000) |
666 | 667 | ||
667 | await servers[2].videos.remove({ id: toRemove[0].id }) | 668 | for (const id of [ toRemove[0].id, toRemove[1].id ]) { |
668 | await servers[2].videos.remove({ id: toRemove[1].id }) | 669 | await saveVideoInServers(servers, id) |
669 | 670 | ||
670 | await waitJobs(servers) | 671 | await servers[2].videos.remove({ id }) |
671 | }) | ||
672 | 672 | ||
673 | it('Should not have files of videos 3 and 3-2 on each server', async function () { | 673 | await waitJobs(servers) |
674 | for (const server of servers) { | 674 | |
675 | await checkVideoFilesWereRemoved(toRemove[0].uuid, server) | 675 | for (const server of servers) { |
676 | await checkVideoFilesWereRemoved(toRemove[1].uuid, server) | 676 | await checkVideoFilesWereRemoved({ server, video: server.store.videoDetails }) |
677 | } | ||
677 | } | 678 | } |
678 | }) | 679 | }) |
679 | 680 | ||