aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy/redundancy-constraints.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/redundancy/redundancy-constraints.ts')
-rw-r--r--server/tests/api/redundancy/redundancy-constraints.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/server/tests/api/redundancy/redundancy-constraints.ts b/server/tests/api/redundancy/redundancy-constraints.ts
index b3f6ed160..0378cc122 100644
--- a/server/tests/api/redundancy/redundancy-constraints.ts
+++ b/server/tests/api/redundancy/redundancy-constraints.ts
@@ -36,21 +36,21 @@ describe('Test redundancy constraints', function () {
36 36
37 async function uploadWrapper (videoName: string) { 37 async function uploadWrapper (videoName: string) {
38 // Wait for transcoding 38 // Wait for transcoding
39 const { id } = await localServer.videosCommand.upload({ attributes: { name: 'to transcode', privacy: VideoPrivacy.PRIVATE } }) 39 const { id } = await localServer.videos.upload({ attributes: { name: 'to transcode', privacy: VideoPrivacy.PRIVATE } })
40 await waitJobs([ localServer ]) 40 await waitJobs([ localServer ])
41 41
42 // Update video to schedule a federation 42 // Update video to schedule a federation
43 await localServer.videosCommand.update({ id, attributes: { name: videoName, privacy: VideoPrivacy.PUBLIC } }) 43 await localServer.videos.update({ id, attributes: { name: videoName, privacy: VideoPrivacy.PUBLIC } })
44 } 44 }
45 45
46 async function getTotalRedundanciesLocalServer () { 46 async function getTotalRedundanciesLocalServer () {
47 const body = await localServer.redundancyCommand.listVideos({ target: 'my-videos' }) 47 const body = await localServer.redundancy.listVideos({ target: 'my-videos' })
48 48
49 return body.total 49 return body.total
50 } 50 }
51 51
52 async function getTotalRedundanciesRemoteServer () { 52 async function getTotalRedundanciesRemoteServer () {
53 const body = await remoteServer.redundancyCommand.listVideos({ target: 'remote-videos' }) 53 const body = await remoteServer.redundancy.listVideos({ target: 'remote-videos' })
54 54
55 return body.total 55 return body.total
56 } 56 }
@@ -78,14 +78,14 @@ describe('Test redundancy constraints', function () {
78 // Get the access tokens 78 // Get the access tokens
79 await setAccessTokensToServers(servers) 79 await setAccessTokensToServers(servers)
80 80
81 await localServer.videosCommand.upload({ attributes: { name: 'video 1 server 2' } }) 81 await localServer.videos.upload({ attributes: { name: 'video 1 server 2' } })
82 82
83 await waitJobs(servers) 83 await waitJobs(servers)
84 84
85 // Server 1 and server 2 follow each other 85 // Server 1 and server 2 follow each other
86 await remoteServer.followsCommand.follow({ targets: [ localServer.url ] }) 86 await remoteServer.follows.follow({ targets: [ localServer.url ] })
87 await waitJobs(servers) 87 await waitJobs(servers)
88 await remoteServer.redundancyCommand.updateRedundancy({ host: localServer.host, redundancyAllowed: true }) 88 await remoteServer.redundancy.updateRedundancy({ host: localServer.host, redundancyAllowed: true })
89 89
90 await waitJobs(servers) 90 await waitJobs(servers)
91 }) 91 })
@@ -94,7 +94,7 @@ describe('Test redundancy constraints', function () {
94 this.timeout(120000) 94 this.timeout(120000)
95 95
96 await waitJobs(servers) 96 await waitJobs(servers)
97 await remoteServer.serversCommand.waitUntilLog('Duplicated ', 5) 97 await remoteServer.servers.waitUntilLog('Duplicated ', 5)
98 await waitJobs(servers) 98 await waitJobs(servers)
99 99
100 { 100 {
@@ -123,7 +123,7 @@ describe('Test redundancy constraints', function () {
123 123
124 await uploadWrapper('video 2 server 2') 124 await uploadWrapper('video 2 server 2')
125 125
126 await remoteServer.serversCommand.waitUntilLog('Duplicated ', 10) 126 await remoteServer.servers.waitUntilLog('Duplicated ', 10)
127 await waitJobs(servers) 127 await waitJobs(servers)
128 128
129 { 129 {
@@ -152,7 +152,7 @@ describe('Test redundancy constraints', function () {
152 152
153 await uploadWrapper('video 3 server 2') 153 await uploadWrapper('video 3 server 2')
154 154
155 await remoteServer.serversCommand.waitUntilLog('Duplicated ', 15) 155 await remoteServer.servers.waitUntilLog('Duplicated ', 15)
156 await waitJobs(servers) 156 await waitJobs(servers)
157 157
158 { 158 {
@@ -169,11 +169,11 @@ describe('Test redundancy constraints', function () {
169 it('Should have redundancy on server 1 and on server 2 with followings filter now server 2 follows server 1', async function () { 169 it('Should have redundancy on server 1 and on server 2 with followings filter now server 2 follows server 1', async function () {
170 this.timeout(120000) 170 this.timeout(120000)
171 171
172 await localServer.followsCommand.follow({ targets: [ remoteServer.url ] }) 172 await localServer.follows.follow({ targets: [ remoteServer.url ] })
173 await waitJobs(servers) 173 await waitJobs(servers)
174 174
175 await uploadWrapper('video 4 server 2') 175 await uploadWrapper('video 4 server 2')
176 await remoteServer.serversCommand.waitUntilLog('Duplicated ', 20) 176 await remoteServer.servers.waitUntilLog('Duplicated ', 20)
177 await waitJobs(servers) 177 await waitJobs(servers)
178 178
179 { 179 {