X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fmultiple-servers.ts;h=22d87b88cab763430fcf5ece141814374fc562e9;hb=941c5eac1751ef93500d6afa58c4575f777dbff9;hp=836bdc6588ce80eb3ddafd86c81d32491ffa6ba4;hpb=b5206dfc455c119b0dcb897bd7144be6ea4d999d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 836bdc658..22d87b88c 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -517,6 +517,8 @@ describe('Test multiple servers', function () { // Wait the repeatable job await wait(6000) + await waitJobs(servers) + for (const server of servers) { const res = await getVideosList(server.url) @@ -551,6 +553,8 @@ describe('Test multiple servers', function () { // Wait the repeatable job await wait(16000) + await waitJobs(servers) + let baseVideos = null for (const server of servers) { @@ -939,48 +943,6 @@ describe('Test multiple servers', function () { } }) - it('Should retrieve all comments when subscribing to a new server', async function () { - this.timeout(120000) - - const newServer = await flushAndRunServer(4) - - await setAccessTokensToServers([newServer]) - await doubleFollow(newServer, servers[0]) - await doubleFollow(newServer, servers[2]) - await waitJobs([newServer, ...servers]) - - const res = await getVideoCommentThreads(newServer.url, videoUUID, 0, 5) - - expect(res.body.total).to.equal(2) - expect(res.body.data).to.be.an('array') - expect(res.body.data).to.have.lengthOf(2) - - { - const comment: VideoComment = res.body.data[0] - expect(comment).to.not.be.undefined - expect(comment.inReplyToCommentId).to.be.null - expect(comment.account.name).to.equal('root') - expect(comment.account.host).to.equal('localhost:' + servers[2].port) - expect(comment.totalReplies).to.equal(0) - expect(dateIsValid(comment.createdAt as string)).to.be.true - expect(dateIsValid(comment.updatedAt as string)).to.be.true - } - - { - const deletedComment: VideoComment = res.body.data[1] - expect(deletedComment).to.not.be.undefined - expect(deletedComment.isDeleted).to.be.true - expect(deletedComment.deletedAt).to.not.be.null - expect(deletedComment.text).to.equal('') - expect(deletedComment.inReplyToCommentId).to.be.null - expect(deletedComment.account).to.be.null - expect(deletedComment.totalReplies).to.equal(3) - expect(dateIsValid(deletedComment.createdAt as string)).to.be.true - expect(dateIsValid(deletedComment.updatedAt as string)).to.be.true - expect(dateIsValid(deletedComment.deletedAt as string)).to.be.true - } - }) - it('Should delete a remote thread by the origin server', async function () { this.timeout(5000)