]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/multiple-servers.ts
Try to cache video_high_bitrate_1080p in travis
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / multiple-servers.ts
index cb18898cef0a2bebb90da20d47b360804d61c4b6..4553ee8553a1084072486122ec009e005a71bc4d 100644 (file)
@@ -6,7 +6,6 @@ import { join } from 'path'
 import * as request from 'supertest'
 import { VideoPrivacy } from '../../../../shared/models/videos'
 import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
-
 import {
   addVideoChannel,
   checkVideoFilesWereRemoved,
@@ -60,6 +59,7 @@ describe('Test multiple servers', function () {
 
     {
       const videoChannel = {
+        name: 'super_channel_name',
         displayName: 'my channel',
         description: 'super channel'
       }
@@ -128,7 +128,8 @@ describe('Test multiple servers', function () {
           privacy: VideoPrivacy.PUBLIC,
           commentsEnabled: true,
           channel: {
-            name: 'my channel',
+            displayName: 'my channel',
+            name: 'super_channel_name',
             description: 'super channel',
             isLocal
           },
@@ -201,7 +202,8 @@ describe('Test multiple servers', function () {
           tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
-            name: 'Default user1 channel',
+            displayName: 'Main user1 channel',
+            name: 'user1_channel',
             description: 'super channel',
             isLocal
           },
@@ -209,19 +211,19 @@ describe('Test multiple servers', function () {
           files: [
             {
               resolution: 240,
-              size: 190000
+              size: 187000
             },
             {
               resolution: 360,
-              size: 280000
+              size: 278000
             },
             {
               resolution: 480,
-              size: 390000
+              size: 383000
             },
             {
               resolution: 720,
-              size: 710000
+              size: 706000
             }
           ],
           thumbnailfile: 'thumbnail',
@@ -307,7 +309,8 @@ describe('Test multiple servers', function () {
           tags: [ 'tag1p3' ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
-            name: 'Default root channel',
+            displayName: 'Main root channel',
+            name: 'root_channel',
             description: '',
             isLocal
           },
@@ -339,7 +342,8 @@ describe('Test multiple servers', function () {
           tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
-            name: 'Default root channel',
+            displayName: 'Main root channel',
+            name: 'root_channel',
             description: '',
             isLocal
           },
@@ -488,7 +492,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should view multiple videos on owned servers', async function () {
-      this.timeout(15000)
+      this.timeout(30000)
 
       const tasks: Promise<any>[] = []
       await viewVideo(servers[2].url, localVideosServer3[0])
@@ -507,6 +511,9 @@ describe('Test multiple servers', function () {
 
       await waitJobs(servers)
 
+      // Wait the repeatable job
+      await wait(6000)
+
       for (const server of servers) {
         const res = await getVideosList(server.url)
 
@@ -520,7 +527,7 @@ describe('Test multiple servers', function () {
     })
 
     it('Should view multiple videos on each servers', async function () {
-      this.timeout(15000)
+      this.timeout(30000)
 
       const tasks: Promise<any>[] = []
       tasks.push(viewVideo(servers[0].url, remoteVideosServer1[0]))
@@ -538,6 +545,9 @@ describe('Test multiple servers', function () {
 
       await waitJobs(servers)
 
+      // Wait the repeatable job
+      await wait(8000)
+
       let baseVideos = null
 
       for (const server of servers) {
@@ -647,7 +657,8 @@ describe('Test multiple servers', function () {
           tags: [ 'tag_up_1', 'tag_up_2' ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
-            name: 'Default root channel',
+            displayName: 'Main root channel',
+            name: 'root_channel',
             description: '',
             isLocal
           },
@@ -967,7 +978,8 @@ describe('Test multiple servers', function () {
           tags: [ ],
           privacy: VideoPrivacy.PUBLIC,
           channel: {
-            name: 'Default root channel',
+            displayName: 'Main root channel',
+            name: 'root_channel',
             description: '',
             isLocal
           },
@@ -975,19 +987,19 @@ describe('Test multiple servers', function () {
           files: [
             {
               resolution: 720,
-              size: 40315
+              size: 36000
             },
             {
               resolution: 480,
-              size: 22808
+              size: 21000
             },
             {
               resolution: 360,
-              size: 18617
+              size: 17000
             },
             {
               resolution: 240,
-              size: 15217
+              size: 13000
             }
           ]
         }