X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fapi%2Fvideos%2Fmultiple-servers.ts;h=a8c8a889b11e8774f3be5322018fafe69c6ec557;hb=3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4;hp=6aa99603808e6bb8712e2eaa054c4ffe5a5e74ed;hpb=1e4d2cb5aef11898585fae4053da4ebd0a69b480;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 6aa996038..a8c8a889b 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -2,11 +2,11 @@ import 'mocha' import * as chai from 'chai' -import { join } from 'path' import * as request from 'supertest' import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' import { addVideoChannel, + buildAbsoluteFixturePath, checkTmpIsEmpty, checkVideoFilesWereRemoved, cleanupTests, @@ -934,7 +934,7 @@ describe('Test multiple servers', function () { expect(deletedComment.text).to.equal('') expect(deletedComment.inReplyToCommentId).to.be.null expect(deletedComment.account).to.be.null - expect(deletedComment.totalReplies).to.equal(3) + expect(deletedComment.totalReplies).to.equal(2) 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 @@ -976,7 +976,7 @@ describe('Test multiple servers', function () { expect(comment.createdAt).to.not.be.null expect(comment.deletedAt).to.not.be.null expect(comment.account).to.be.null - expect(comment.totalReplies).to.equal(3) + expect(comment.totalReplies).to.equal(2) } } }) @@ -1018,9 +1018,7 @@ describe('Test multiple servers', function () { .field('privacy', '1') .field('channelId', '1') - const filePath = join(__dirname, '..', '..', 'fixtures', 'video_short.webm') - - await req.attach('videofile', filePath) + await req.attach('videofile', buildAbsoluteFixturePath('video_short.webm')) .expect(HttpStatusCode.OK_200) await waitJobs(servers)