aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-views-cleaner.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/api/videos/videos-views-cleaner.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tests/api/videos/videos-views-cleaner.ts')
-rw-r--r--server/tests/api/videos/videos-views-cleaner.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts
index 238662cf3..0be03ddd2 100644
--- a/server/tests/api/videos/videos-views-cleaner.ts
+++ b/server/tests/api/videos/videos-views-cleaner.ts
@@ -5,10 +5,9 @@ import * as chai from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 doubleFollow, 7 doubleFollow,
8 flushAndRunMultipleServers, 8 createMultipleServers,
9 killallServers, 9 killallServers,
10 reRunServer, 10 PeerTubeServer,
11 ServerInfo,
12 setAccessTokensToServers, 11 setAccessTokensToServers,
13 wait, 12 wait,
14 waitJobs 13 waitJobs
@@ -17,7 +16,7 @@ import {
17const expect = chai.expect 16const expect = chai.expect
18 17
19describe('Test video views cleaner', function () { 18describe('Test video views cleaner', function () {
20 let servers: ServerInfo[] 19 let servers: PeerTubeServer[]
21 20
22 let videoIdServer1: string 21 let videoIdServer1: string
23 let videoIdServer2: string 22 let videoIdServer2: string
@@ -25,7 +24,7 @@ describe('Test video views cleaner', function () {
25 before(async function () { 24 before(async function () {
26 this.timeout(120000) 25 this.timeout(120000)
27 26
28 servers = await flushAndRunMultipleServers(2) 27 servers = await createMultipleServers(2)
29 await setAccessTokensToServers(servers) 28 await setAccessTokensToServers(servers)
30 29
31 await doubleFollow(servers[0], servers[1]) 30 await doubleFollow(servers[0], servers[1])
@@ -48,7 +47,7 @@ describe('Test video views cleaner', function () {
48 47
49 await killallServers([ servers[0] ]) 48 await killallServers([ servers[0] ])
50 49
51 await reRunServer(servers[0], { views: { videos: { remote: { max_age: '10 days' } } } }) 50 await servers[0].run({ views: { videos: { remote: { max_age: '10 days' } } } })
52 51
53 await wait(6000) 52 await wait(6000)
54 53
@@ -74,7 +73,7 @@ describe('Test video views cleaner', function () {
74 73
75 await killallServers([ servers[0] ]) 74 await killallServers([ servers[0] ])
76 75
77 await reRunServer(servers[0], { views: { videos: { remote: { max_age: '5 seconds' } } } }) 76 await servers[0].run({ views: { videos: { remote: { max_age: '5 seconds' } } } })
78 77
79 await wait(6000) 78 await wait(6000)
80 79