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',
}
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) {
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) {
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
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
// Initialize base videos for future comparisons
if (baseVideos === null) {
baseVideos = videos
- return
+ continue
}
for (const baseVideo of baseVideos) {
// 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)
- })
+ }
}
})
})
if (baseVideo === null) {
baseVideo = video
- return
+ continue
}
expect(baseVideo.name).to.equal(video.name)
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)
}
})