]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/multiple-servers.ts
Add basic video editor support
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / multiple-servers.ts
index c6c2790649b6c74fb78167802a6ec020c21afea5..5bbc605599842110c40974e20653223e01c3b95e 100644 (file)
@@ -4,23 +4,26 @@ import 'mocha'
 import * as chai from 'chai'
 import request from 'supertest'
 import {
-  buildAbsoluteFixturePath,
   checkTmpIsEmpty,
   checkVideoFilesWereRemoved,
-  cleanupTests,
   completeVideoCheck,
-  createMultipleServers,
   dateIsValid,
+  saveVideoInServers,
+  testImage
+} from '@server/tests/shared'
+import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
+import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
+import {
+  cleanupTests,
+  createMultipleServers,
   doubleFollow,
   PeerTubeServer,
-  saveVideoInServers,
   setAccessTokensToServers,
-  testImage,
-  wait,
+  setDefaultAccountAvatar,
+  setDefaultChannelAvatar,
   waitJobs,
   webtorrentAdd
-} from '@shared/extra-utils'
-import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -45,6 +48,9 @@ describe('Test multiple servers', function () {
         description: 'super channel'
       }
       await servers[0].channels.create({ attributes: videoChannel })
+      await setDefaultChannelAvatar(servers[0], videoChannel.name)
+      await setDefaultAccountAvatar(servers)
+
       const { data } = await servers[0].channels.list({ start: 0, count: 1 })
       videoChannelId = data[0].id
     }
@@ -206,7 +212,7 @@ describe('Test multiple servers', function () {
             },
             {
               resolution: 720,
-              size: 788000
+              size: 750000
             }
           ],
           thumbnailfile: 'thumbnail',
@@ -379,7 +385,7 @@ describe('Test multiple servers', function () {
 
   describe('Should seed the uploaded video', function () {
     it('Should add the file 1 by asking server 3', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const { data } = await servers[2].videos.list()
 
@@ -395,7 +401,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should add the file 2 by asking server 1', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const { data } = await servers[0].videos.list()
 
@@ -409,7 +415,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should add the file 3 by asking server 2', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const { data } = await servers[1].videos.list()
 
@@ -423,7 +429,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should add the file 3-2 by asking server 1', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const { data } = await servers[0].videos.list()
 
@@ -437,7 +443,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should add the file 2 in 360p by asking server 1', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const { data } = await servers[0].videos.list()
 
@@ -594,7 +600,7 @@ describe('Test multiple servers', function () {
     let updatedAtMin: Date
 
     it('Should update video 3', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const attributes = {
         name: 'my super video updated',
@@ -617,7 +623,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should have the video 3 updated on each server', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       for (const server of servers) {
         const { data } = await server.videos.list()
@@ -668,7 +674,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should only update thumbnail and update updatedAt attribute', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const attributes = {
         thumbnailfile: 'thumbnail.jpg'
@@ -860,7 +866,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should delete a reply', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       await servers[2].comments.delete({ videoId: videoUUID, commentId: childOfFirstChild.comment.id })
 
@@ -891,7 +897,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should delete the thread comments', async function () {
-      this.timeout(10000)
+      this.timeout(30000)
 
       const { data } = await servers[0].comments.listThreads({ videoId: videoUUID })
       const commentId = data.find(c => c.text === 'my super first comment').id