aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy/redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-24 13:36:47 +0100
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commitb211106695bb82f6c32e53306081b5262c3d109d (patch)
treefa187de1c33b0956665f5362e29af6b0f6d8bb57 /server/tests/api/redundancy/redundancy.ts
parent69d48ee30c9d47cddf0c3c047dc99a99dcb6e894 (diff)
downloadPeerTube-b211106695bb82f6c32e53306081b5262c3d109d.tar.gz
PeerTube-b211106695bb82f6c32e53306081b5262c3d109d.tar.zst
PeerTube-b211106695bb82f6c32e53306081b5262c3d109d.zip
Support video views/viewers stats in server
* Add "currentTime" and "event" body params to view endpoint * Merge watching and view endpoints * Introduce WatchAction AP activity * Add tables to store viewer information of local videos * Add endpoints to fetch video views/viewers stats of local videos * Refactor views/viewers handlers * Support "views" and "viewers" counters for both VOD and live videos
Diffstat (limited to 'server/tests/api/redundancy/redundancy.ts')
-rw-r--r--server/tests/api/redundancy/redundancy.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 3f2286278..0f7ffcb4c 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -87,7 +87,7 @@ async function createServers (strategy: VideoRedundancyStrategy | null, addition
87 const { id } = await servers[1].videos.upload({ attributes: { name: 'video 1 server 2' } }) 87 const { id } = await servers[1].videos.upload({ attributes: { name: 'video 1 server 2' } })
88 video1Server2 = await servers[1].videos.get({ id }) 88 video1Server2 = await servers[1].videos.get({ id })
89 89
90 await servers[1].videos.view({ id }) 90 await servers[1].views.simulateView({ id })
91 } 91 }
92 92
93 await waitJobs(servers) 93 await waitJobs(servers)
@@ -447,8 +447,8 @@ describe('Test videos redundancy', function () {
447 it('Should view 2 times the first video to have > min_views config', async function () { 447 it('Should view 2 times the first video to have > min_views config', async function () {
448 this.timeout(80000) 448 this.timeout(80000)
449 449
450 await servers[0].videos.view({ id: video1Server2.uuid }) 450 await servers[0].views.simulateView({ id: video1Server2.uuid })
451 await servers[2].videos.view({ id: video1Server2.uuid }) 451 await servers[2].views.simulateView({ id: video1Server2.uuid })
452 452
453 await wait(10000) 453 await wait(10000)
454 await waitJobs(servers) 454 await waitJobs(servers)
@@ -516,8 +516,8 @@ describe('Test videos redundancy', function () {
516 it('Should have 1 redundancy on the first video', async function () { 516 it('Should have 1 redundancy on the first video', async function () {
517 this.timeout(160000) 517 this.timeout(160000)
518 518
519 await servers[0].videos.view({ id: video1Server2.uuid }) 519 await servers[0].views.simulateView({ id: video1Server2.uuid })
520 await servers[2].videos.view({ id: video1Server2.uuid }) 520 await servers[2].views.simulateView({ id: video1Server2.uuid })
521 521
522 await wait(10000) 522 await wait(10000)
523 await waitJobs(servers) 523 await waitJobs(servers)