]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-playlists.ts
Also retry when fetching master m3u8 playlist
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-playlists.ts
index 34327334f183a06982cc91f4a675bf4baa1f2bc3..9d223de485f646fdcf5b21c4ad8d6881effea8b8 100644 (file)
@@ -1,7 +1,6 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
-import * as chai from 'chai'
+import { expect } from 'chai'
 import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared'
 import { wait } from '@shared/core-utils'
 import {
@@ -20,12 +19,11 @@ import {
   PeerTubeServer,
   PlaylistsCommand,
   setAccessTokensToServers,
+  setDefaultAccountAvatar,
   setDefaultVideoChannel,
   waitJobs
 } from '@shared/server-commands'
 
-const expect = chai.expect
-
 async function checkPlaylistElementType (
   servers: PeerTubeServer[],
   playlistId: string,
@@ -72,13 +70,18 @@ describe('Test video playlists', function () {
   let commands: PlaylistsCommand[]
 
   before(async function () {
-    this.timeout(120000)
+    this.timeout(240000)
 
-    servers = await createMultipleServers(3, { transcoding: { enabled: false } })
+    servers = await createMultipleServers(3)
 
     // Get the access tokens
     await setAccessTokensToServers(servers)
     await setDefaultVideoChannel(servers)
+    await setDefaultAccountAvatar(servers)
+
+    for (const server of servers) {
+      await server.config.disableTranscoding()
+    }
 
     // Server 1 and server 2 follow each other
     await doubleFollow(servers[0], servers[1])
@@ -1046,7 +1049,7 @@ describe('Test video playlists', function () {
       this.timeout(30000)
 
       for (const server of servers) {
-        await checkPlaylistFilesWereRemoved(playlistServer1UUID, server.internalServerNumber)
+        await checkPlaylistFilesWereRemoved(playlistServer1UUID, server)
       }
     })