+ await checkStatsWith1Redundancy(strategy)
+ })
+
+ it('Should remove the video and the redundancy files', async function () {
+ this.timeout(20000)
+
+ await saveVideoInServers(servers, video1Server2.uuid)
+ await servers[1].videos.remove({ id: video1Server2.uuid })
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ await checkVideoFilesWereRemoved({ server, video: server.store.videoDetails })
+ }
+ })
+
+ after(async function () {
+ await cleanupTests(servers)
+ })
+ })
+
+ describe('With only HLS files', function () {
+ const strategy = 'recently-added'
+
+ before(async function () {
+ this.timeout(240000)
+
+ await createServers(strategy, { min_views: 3 }, false)
+ })
+
+ it('Should have 0 playlist redundancy on the first video', async function () {
+ await check1WebSeed()
+ await check0PlaylistRedundancies()
+ })
+
+ it('Should enable redundancy on server 1', function () {
+ return enableRedundancyOnServer1()
+ })
+
+ it('Should still have 0 redundancy on the first video', async function () {
+ this.timeout(80000)
+
+ await waitJobs(servers)
+ await wait(15000)
+ await waitJobs(servers)
+
+ await check0PlaylistRedundancies()
+ await checkStatsWithoutRedundancy(strategy)
+ })
+
+ it('Should have 1 redundancy on the first video', async function () {
+ this.timeout(160000)
+
+ await servers[0].views.simulateView({ id: video1Server2.uuid })
+ await servers[2].views.simulateView({ id: video1Server2.uuid })
+
+ await wait(10000)
+ await waitJobs(servers)
+
+ await waitJobs(servers)
+ await servers[0].servers.waitUntilLog('Duplicated ', 1)
+ await waitJobs(servers)
+
+ await check1PlaylistRedundancies()
+ await checkStatsWith1Redundancy(strategy, true)