X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fmultiple-servers.ts;h=052b0231f2c986cedf869c726440a3f3b1ff29ab;hb=62c852b2b40b4f42c32941deb1b1ccd3f17bcd98;hp=b6a57ab6d46269979ffd42db24ef3534476ea616;hpb=572f8d3dba44ba874f5c51023214273e3f5b643c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/multiple-servers.ts b/server/tests/api/multiple-servers.ts index b6a57ab6d..052b0231f 100644 --- a/server/tests/api/multiple-servers.ts +++ b/server/tests/api/multiple-servers.ts @@ -69,8 +69,7 @@ describe('Test multiple servers', function () { describe('Should upload the video and propagate on each server', function () { it('Should upload the video on server 1 and propagate on each server', async function () { - // Server 1 has video transcoding activated - this.timeout(15000) + this.timeout(25000) const videoAttributes = { name: 'my super name for server 1', @@ -85,7 +84,7 @@ describe('Test multiple servers', function () { } await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes) - await wait(5000) + await wait(10000) // All servers should have this video for (const server of servers) { @@ -175,7 +174,7 @@ describe('Test multiple servers', function () { await uploadVideo(servers[1].url, userAccessToken, videoAttributes) // Transcoding - await wait(10000) + await wait(30000) // All servers should have this video for (const server of servers) { @@ -316,7 +315,7 @@ describe('Test multiple servers', function () { expect(video1.serverHost).to.equal('localhost:9003') expect(video1.duration).to.equal(5) expect(video1.tags).to.deep.equal([ 'tag1p3' ]) - expect(video1.author).to.equal('root') + expect(video1.account).to.equal('root') expect(dateIsValid(video1.createdAt)).to.be.true expect(dateIsValid(video1.updatedAt)).to.be.true @@ -342,7 +341,7 @@ describe('Test multiple servers', function () { expect(video2.serverHost).to.equal('localhost:9003') expect(video2.duration).to.equal(5) expect(video2.tags).to.deep.equal([ 'tag2p3', 'tag3p3', 'tag4p3' ]) - expect(video2.author).to.equal('root') + expect(video2.account).to.equal('root') expect(dateIsValid(video2.createdAt)).to.be.true expect(dateIsValid(video2.updatedAt)).to.be.true @@ -537,7 +536,7 @@ describe('Test multiple servers', function () { // Initialize base videos for future comparisons if (baseVideos === null) { baseVideos = videos - return + continue } for (const baseVideo of baseVideos) { @@ -572,14 +571,14 @@ describe('Test multiple servers', function () { // Initialize base videos for future comparisons if (baseVideos === null) { baseVideos = videos - return + continue } - baseVideos.forEach(baseVideo => { + for (const baseVideo of baseVideos) { const sameVideo = videos.find(video => video.name === baseVideo.name) expect(baseVideo.likes).to.equal(sameVideo.likes) expect(baseVideo.dislikes).to.equal(sameVideo.dislikes) - }) + } } }) }) @@ -680,7 +679,7 @@ describe('Test multiple servers', function () { if (baseVideo === null) { baseVideo = video - return + continue } expect(baseVideo.name).to.equal(video.name) @@ -690,7 +689,7 @@ describe('Test multiple servers', function () { expect(baseVideo.licence).to.equal(video.licence) expect(baseVideo.category).to.equal(video.category) expect(baseVideo.nsfw).to.equal(video.nsfw) - expect(baseVideo.author).to.equal(video.account) + expect(baseVideo.account).to.equal(video.account) expect(baseVideo.tags).to.deep.equal(video.tags) } })