X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fviews%2Fvideo-views-counter.ts;h=b8969d52dbca9c0a0628d760cecca3974205731b;hb=ac907dc7c158056e9b6a5cb58acd27df5c7c2670;hp=b68aaa3504f08cf79659112622bb39bd9297f07b;hpb=dfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/views/video-views-counter.ts b/server/tests/api/views/video-views-counter.ts index b68aaa350..b8969d52d 100644 --- a/server/tests/api/views/video-views-counter.ts +++ b/server/tests/api/views/video-views-counter.ts @@ -57,10 +57,11 @@ describe('Test video views/viewers counters', function () { }) it('Should not view again this video with the same IP', async function () { - await servers[0].views.simulateViewer({ id: videoUUID, currentTimes: [ 1, 4 ] }) + await servers[0].views.simulateViewer({ id: videoUUID, xForwardedFor: '0.0.0.1,127.0.0.1', currentTimes: [ 1, 4 ] }) + await servers[0].views.simulateViewer({ id: videoUUID, xForwardedFor: '0.0.0.1,127.0.0.1', currentTimes: [ 1, 4 ] }) await processViewsBuffer(servers) - await checkCounter('views', videoUUID, 1) + await checkCounter('views', videoUUID, 2) }) it('Should view the video from server 2 and send the event', async function () { @@ -68,7 +69,7 @@ describe('Test video views/viewers counters', function () { await waitJobs(servers) await processViewsBuffer(servers) - await checkCounter('views', videoUUID, 2) + await checkCounter('views', videoUUID, 3) }) }) @@ -78,7 +79,7 @@ describe('Test video views/viewers counters', function () { let command: FfmpegCommand before(async function () { - this.timeout(60000); + this.timeout(120000); ({ vodVideoId, liveVideoId, ffmpegCommand: command } = await prepareViewsVideos({ servers, live: true, vod: true })) })