aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/multiple-servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r--server/tests/api/videos/multiple-servers.ts21
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