aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/redundancy
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'server/tests/api/redundancy')
-rw-r--r--server/tests/api/redundancy/manage-redundancy.ts14
-rw-r--r--server/tests/api/redundancy/redundancy-constraints.ts24
-rw-r--r--server/tests/api/redundancy/redundancy.ts62
3 files changed, 50 insertions, 50 deletions
diff --git a/server/tests/api/redundancy/manage-redundancy.ts b/server/tests/api/redundancy/manage-redundancy.ts
index efb60dc56..e193b968e 100644
--- a/server/tests/api/redundancy/manage-redundancy.ts
+++ b/server/tests/api/redundancy/manage-redundancy.ts
@@ -53,15 +53,15 @@ describe('Test manage videos redundancy', function () {
53 // Get the access tokens 53 // Get the access tokens
54 await setAccessTokensToServers(servers) 54 await setAccessTokensToServers(servers)
55 55
56 commands = servers.map(s => s.redundancyCommand) 56 commands = servers.map(s => s.redundancy)
57 57
58 { 58 {
59 const { uuid } = await servers[1].videosCommand.upload({ attributes: { name: 'video 1 server 2' } }) 59 const { uuid } = await servers[1].videos.upload({ attributes: { name: 'video 1 server 2' } })
60 video1Server2UUID = uuid 60 video1Server2UUID = uuid
61 } 61 }
62 62
63 { 63 {
64 const { uuid } = await servers[1].videosCommand.upload({ attributes: { name: 'video 2 server 2' } }) 64 const { uuid } = await servers[1].videos.upload({ attributes: { name: 'video 2 server 2' } })
65 video2Server2UUID = uuid 65 video2Server2UUID = uuid
66 } 66 }
67 67
@@ -87,7 +87,7 @@ describe('Test manage videos redundancy', function () {
87 this.timeout(120000) 87 this.timeout(120000)
88 88
89 await waitJobs(servers) 89 await waitJobs(servers)
90 await servers[0].serversCommand.waitUntilLog('Duplicated ', 10) 90 await servers[0].servers.waitUntilLog('Duplicated ', 10)
91 await waitJobs(servers) 91 await waitJobs(servers)
92 92
93 const body = await commands[1].listVideos({ target: 'remote-videos' }) 93 const body = await commands[1].listVideos({ target: 'remote-videos' })
@@ -203,14 +203,14 @@ describe('Test manage videos redundancy', function () {
203 it('Should manually add a redundancy and list it', async function () { 203 it('Should manually add a redundancy and list it', async function () {
204 this.timeout(120000) 204 this.timeout(120000)
205 205
206 const uuid = (await servers[1].videosCommand.quickUpload({ name: 'video 3 server 2', privacy: VideoPrivacy.UNLISTED })).uuid 206 const uuid = (await servers[1].videos.quickUpload({ name: 'video 3 server 2', privacy: VideoPrivacy.UNLISTED })).uuid
207 await waitJobs(servers) 207 await waitJobs(servers)
208 const videoId = await servers[0].videosCommand.getId({ uuid }) 208 const videoId = await servers[0].videos.getId({ uuid })
209 209
210 await commands[0].addVideo({ videoId }) 210 await commands[0].addVideo({ videoId })
211 211
212 await waitJobs(servers) 212 await waitJobs(servers)
213 await servers[0].serversCommand.waitUntilLog('Duplicated ', 15) 213 await servers[0].servers.waitUntilLog('Duplicated ', 15)
214 await waitJobs(servers) 214 await waitJobs(servers)
215 215
216 { 216 {
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 {
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 6ca9c9303..77ea2278e 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -78,11 +78,11 @@ async function flushAndRunServers (strategy: VideoRedundancyStrategy | null, add
78 await setAccessTokensToServers(servers) 78 await setAccessTokensToServers(servers)
79 79
80 { 80 {
81 const { uuid, id } = await servers[1].videosCommand.upload({ attributes: { name: 'video 1 server 2' } }) 81 const { uuid, id } = await servers[1].videos.upload({ attributes: { name: 'video 1 server 2' } })
82 video1Server2UUID = uuid 82 video1Server2UUID = uuid
83 video1Server2Id = id 83 video1Server2Id = id
84 84
85 await servers[1].videosCommand.view({ id: video1Server2UUID }) 85 await servers[1].videos.view({ id: video1Server2UUID })
86 } 86 }
87 87
88 await waitJobs(servers) 88 await waitJobs(servers)
@@ -106,7 +106,7 @@ async function check1WebSeed (videoUUID?: string) {
106 106
107 for (const server of servers) { 107 for (const server of servers) {
108 // With token to avoid issues with video follow constraints 108 // With token to avoid issues with video follow constraints
109 const video = await server.videosCommand.getWithToken({ id: videoUUID }) 109 const video = await server.videos.getWithToken({ id: videoUUID })
110 110
111 for (const f of video.files) { 111 for (const f of video.files) {
112 checkMagnetWebseeds(f, webseeds, server) 112 checkMagnetWebseeds(f, webseeds, server)
@@ -123,7 +123,7 @@ async function check2Webseeds (videoUUID?: string) {
123 ] 123 ]
124 124
125 for (const server of servers) { 125 for (const server of servers) {
126 const video = await server.videosCommand.get({ id: videoUUID }) 126 const video = await server.videos.get({ id: videoUUID })
127 127
128 for (const file of video.files) { 128 for (const file of video.files) {
129 checkMagnetWebseeds(file, webseeds, server) 129 checkMagnetWebseeds(file, webseeds, server)
@@ -163,7 +163,7 @@ async function check0PlaylistRedundancies (videoUUID?: string) {
163 163
164 for (const server of servers) { 164 for (const server of servers) {
165 // With token to avoid issues with video follow constraints 165 // With token to avoid issues with video follow constraints
166 const video = await server.videosCommand.getWithToken({ id: videoUUID }) 166 const video = await server.videos.getWithToken({ id: videoUUID })
167 167
168 expect(video.streamingPlaylists).to.be.an('array') 168 expect(video.streamingPlaylists).to.be.an('array')
169 expect(video.streamingPlaylists).to.have.lengthOf(1) 169 expect(video.streamingPlaylists).to.have.lengthOf(1)
@@ -175,7 +175,7 @@ async function check1PlaylistRedundancies (videoUUID?: string) {
175 if (!videoUUID) videoUUID = video1Server2UUID 175 if (!videoUUID) videoUUID = video1Server2UUID
176 176
177 for (const server of servers) { 177 for (const server of servers) {
178 const video = await server.videosCommand.get({ id: videoUUID }) 178 const video = await server.videos.get({ id: videoUUID })
179 179
180 expect(video.streamingPlaylists).to.have.lengthOf(1) 180 expect(video.streamingPlaylists).to.have.lengthOf(1)
181 expect(video.streamingPlaylists[0].redundancies).to.have.lengthOf(1) 181 expect(video.streamingPlaylists[0].redundancies).to.have.lengthOf(1)
@@ -188,7 +188,7 @@ async function check1PlaylistRedundancies (videoUUID?: string) {
188 const baseUrlPlaylist = servers[1].url + '/static/streaming-playlists/hls' 188 const baseUrlPlaylist = servers[1].url + '/static/streaming-playlists/hls'
189 const baseUrlSegment = servers[0].url + '/static/redundancy/hls' 189 const baseUrlSegment = servers[0].url + '/static/redundancy/hls'
190 190
191 const video = await servers[0].videosCommand.get({ id: videoUUID }) 191 const video = await servers[0].videos.get({ id: videoUUID })
192 const hlsPlaylist = video.streamingPlaylists[0] 192 const hlsPlaylist = video.streamingPlaylists[0]
193 193
194 for (const resolution of [ 240, 360, 480, 720 ]) { 194 for (const resolution of [ 240, 360, 480, 720 ]) {
@@ -221,7 +221,7 @@ async function checkStatsGlobal (strategy: VideoRedundancyStrategyWithManual) {
221 statsLength = 2 221 statsLength = 2
222 } 222 }
223 223
224 const data = await servers[0].statsCommand.get() 224 const data = await servers[0].stats.get()
225 expect(data.videosRedundancy).to.have.lengthOf(statsLength) 225 expect(data.videosRedundancy).to.have.lengthOf(statsLength)
226 226
227 const stat = data.videosRedundancy[0] 227 const stat = data.videosRedundancy[0]
@@ -248,7 +248,7 @@ async function checkStatsWithoutRedundancy (strategy: VideoRedundancyStrategyWit
248} 248}
249 249
250async function findServerFollows () { 250async function findServerFollows () {
251 const body = await servers[0].followsCommand.getFollowings({ start: 0, count: 5, sort: '-createdAt' }) 251 const body = await servers[0].follows.getFollowings({ start: 0, count: 5, sort: '-createdAt' })
252 const follows = body.data 252 const follows = body.data
253 const server2 = follows.find(f => f.following.host === `localhost:${servers[1].port}`) 253 const server2 = follows.find(f => f.following.host === `localhost:${servers[1].port}`)
254 const server3 = follows.find(f => f.following.host === `localhost:${servers[2].port}`) 254 const server3 = follows.find(f => f.following.host === `localhost:${servers[2].port}`)
@@ -257,7 +257,7 @@ async function findServerFollows () {
257} 257}
258 258
259async function enableRedundancyOnServer1 () { 259async function enableRedundancyOnServer1 () {
260 await servers[0].redundancyCommand.updateRedundancy({ host: servers[1].host, redundancyAllowed: true }) 260 await servers[0].redundancy.updateRedundancy({ host: servers[1].host, redundancyAllowed: true })
261 261
262 const { server2, server3 } = await findServerFollows() 262 const { server2, server3 } = await findServerFollows()
263 263
@@ -269,7 +269,7 @@ async function enableRedundancyOnServer1 () {
269} 269}
270 270
271async function disableRedundancyOnServer1 () { 271async function disableRedundancyOnServer1 () {
272 await servers[0].redundancyCommand.updateRedundancy({ host: servers[1].host, redundancyAllowed: false }) 272 await servers[0].redundancy.updateRedundancy({ host: servers[1].host, redundancyAllowed: false })
273 273
274 const { server2, server3 } = await findServerFollows() 274 const { server2, server3 } = await findServerFollows()
275 275
@@ -305,7 +305,7 @@ describe('Test videos redundancy', function () {
305 this.timeout(80000) 305 this.timeout(80000)
306 306
307 await waitJobs(servers) 307 await waitJobs(servers)
308 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5) 308 await servers[0].servers.waitUntilLog('Duplicated ', 5)
309 await waitJobs(servers) 309 await waitJobs(servers)
310 310
311 await check2Webseeds() 311 await check2Webseeds()
@@ -355,7 +355,7 @@ describe('Test videos redundancy', function () {
355 this.timeout(80000) 355 this.timeout(80000)
356 356
357 await waitJobs(servers) 357 await waitJobs(servers)
358 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5) 358 await servers[0].servers.waitUntilLog('Duplicated ', 5)
359 await waitJobs(servers) 359 await waitJobs(servers)
360 360
361 await check2Webseeds() 361 await check2Webseeds()
@@ -366,7 +366,7 @@ describe('Test videos redundancy', function () {
366 it('Should unfollow on server 1 and remove duplicated videos', async function () { 366 it('Should unfollow on server 1 and remove duplicated videos', async function () {
367 this.timeout(80000) 367 this.timeout(80000)
368 368
369 await servers[0].followsCommand.unfollow({ target: servers[1] }) 369 await servers[0].follows.unfollow({ target: servers[1] })
370 370
371 await waitJobs(servers) 371 await waitJobs(servers)
372 await wait(5000) 372 await wait(5000)
@@ -416,8 +416,8 @@ describe('Test videos redundancy', function () {
416 it('Should view 2 times the first video to have > min_views config', async function () { 416 it('Should view 2 times the first video to have > min_views config', async function () {
417 this.timeout(80000) 417 this.timeout(80000)
418 418
419 await servers[0].videosCommand.view({ id: video1Server2UUID }) 419 await servers[0].videos.view({ id: video1Server2UUID })
420 await servers[2].videosCommand.view({ id: video1Server2UUID }) 420 await servers[2].videos.view({ id: video1Server2UUID })
421 421
422 await wait(10000) 422 await wait(10000)
423 await waitJobs(servers) 423 await waitJobs(servers)
@@ -427,7 +427,7 @@ describe('Test videos redundancy', function () {
427 this.timeout(80000) 427 this.timeout(80000)
428 428
429 await waitJobs(servers) 429 await waitJobs(servers)
430 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5) 430 await servers[0].servers.waitUntilLog('Duplicated ', 5)
431 await waitJobs(servers) 431 await waitJobs(servers)
432 432
433 await check2Webseeds() 433 await check2Webseeds()
@@ -438,7 +438,7 @@ describe('Test videos redundancy', function () {
438 it('Should remove the video and the redundancy files', async function () { 438 it('Should remove the video and the redundancy files', async function () {
439 this.timeout(20000) 439 this.timeout(20000)
440 440
441 await servers[1].videosCommand.remove({ id: video1Server2UUID }) 441 await servers[1].videos.remove({ id: video1Server2UUID })
442 442
443 await waitJobs(servers) 443 await waitJobs(servers)
444 444
@@ -484,14 +484,14 @@ describe('Test videos redundancy', function () {
484 it('Should have 1 redundancy on the first video', async function () { 484 it('Should have 1 redundancy on the first video', async function () {
485 this.timeout(160000) 485 this.timeout(160000)
486 486
487 await servers[0].videosCommand.view({ id: video1Server2UUID }) 487 await servers[0].videos.view({ id: video1Server2UUID })
488 await servers[2].videosCommand.view({ id: video1Server2UUID }) 488 await servers[2].videos.view({ id: video1Server2UUID })
489 489
490 await wait(10000) 490 await wait(10000)
491 await waitJobs(servers) 491 await waitJobs(servers)
492 492
493 await waitJobs(servers) 493 await waitJobs(servers)
494 await servers[0].serversCommand.waitUntilLog('Duplicated ', 1) 494 await servers[0].servers.waitUntilLog('Duplicated ', 1)
495 await waitJobs(servers) 495 await waitJobs(servers)
496 496
497 await check1PlaylistRedundancies() 497 await check1PlaylistRedundancies()
@@ -501,7 +501,7 @@ describe('Test videos redundancy', function () {
501 it('Should remove the video and the redundancy files', async function () { 501 it('Should remove the video and the redundancy files', async function () {
502 this.timeout(20000) 502 this.timeout(20000)
503 503
504 await servers[1].videosCommand.remove({ id: video1Server2UUID }) 504 await servers[1].videos.remove({ id: video1Server2UUID })
505 505
506 await waitJobs(servers) 506 await waitJobs(servers)
507 507
@@ -529,14 +529,14 @@ describe('Test videos redundancy', function () {
529 }) 529 })
530 530
531 it('Should create a redundancy on first video', async function () { 531 it('Should create a redundancy on first video', async function () {
532 await servers[0].redundancyCommand.addVideo({ videoId: video1Server2Id }) 532 await servers[0].redundancy.addVideo({ videoId: video1Server2Id })
533 }) 533 })
534 534
535 it('Should have 2 webseeds on the first video', async function () { 535 it('Should have 2 webseeds on the first video', async function () {
536 this.timeout(80000) 536 this.timeout(80000)
537 537
538 await waitJobs(servers) 538 await waitJobs(servers)
539 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5) 539 await servers[0].servers.waitUntilLog('Duplicated ', 5)
540 await waitJobs(servers) 540 await waitJobs(servers)
541 541
542 await check2Webseeds() 542 await check2Webseeds()
@@ -547,7 +547,7 @@ describe('Test videos redundancy', function () {
547 it('Should manually remove redundancies on server 1 and remove duplicated videos', async function () { 547 it('Should manually remove redundancies on server 1 and remove duplicated videos', async function () {
548 this.timeout(80000) 548 this.timeout(80000)
549 549
550 const body = await servers[0].redundancyCommand.listVideos({ target: 'remote-videos' }) 550 const body = await servers[0].redundancy.listVideos({ target: 'remote-videos' })
551 551
552 const videos = body.data 552 const videos = body.data
553 expect(videos).to.have.lengthOf(1) 553 expect(videos).to.have.lengthOf(1)
@@ -555,7 +555,7 @@ describe('Test videos redundancy', function () {
555 const video = videos[0] 555 const video = videos[0]
556 556
557 for (const r of video.redundancies.files.concat(video.redundancies.streamingPlaylists)) { 557 for (const r of video.redundancies.files.concat(video.redundancies.streamingPlaylists)) {
558 await servers[0].redundancyCommand.removeVideo({ redundancyId: r.id }) 558 await servers[0].redundancy.removeVideo({ redundancyId: r.id })
559 } 559 }
560 560
561 await waitJobs(servers) 561 await waitJobs(servers)
@@ -577,7 +577,7 @@ describe('Test videos redundancy', function () {
577 577
578 async function checkContains (servers: ServerInfo[], str: string) { 578 async function checkContains (servers: ServerInfo[], str: string) {
579 for (const server of servers) { 579 for (const server of servers) {
580 const video = await server.videosCommand.get({ id: video1Server2UUID }) 580 const video = await server.videos.get({ id: video1Server2UUID })
581 581
582 for (const f of video.files) { 582 for (const f of video.files) {
583 expect(f.magnetUri).to.contain(str) 583 expect(f.magnetUri).to.contain(str)
@@ -587,7 +587,7 @@ describe('Test videos redundancy', function () {
587 587
588 async function checkNotContains (servers: ServerInfo[], str: string) { 588 async function checkNotContains (servers: ServerInfo[], str: string) {
589 for (const server of servers) { 589 for (const server of servers) {
590 const video = await server.videosCommand.get({ id: video1Server2UUID }) 590 const video = await server.videos.get({ id: video1Server2UUID })
591 591
592 for (const f of video.files) { 592 for (const f of video.files) {
593 expect(f.magnetUri).to.not.contain(str) 593 expect(f.magnetUri).to.not.contain(str)
@@ -645,20 +645,20 @@ describe('Test videos redundancy', function () {
645 await enableRedundancyOnServer1() 645 await enableRedundancyOnServer1()
646 646
647 await waitJobs(servers) 647 await waitJobs(servers)
648 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5) 648 await servers[0].servers.waitUntilLog('Duplicated ', 5)
649 await waitJobs(servers) 649 await waitJobs(servers)
650 650
651 await check2Webseeds(video1Server2UUID) 651 await check2Webseeds(video1Server2UUID)
652 await check1PlaylistRedundancies(video1Server2UUID) 652 await check1PlaylistRedundancies(video1Server2UUID)
653 await checkStatsWith1Redundancy(strategy) 653 await checkStatsWith1Redundancy(strategy)
654 654
655 const { uuid } = await servers[1].videosCommand.upload({ attributes: { name: 'video 2 server 2', privacy: VideoPrivacy.PRIVATE } }) 655 const { uuid } = await servers[1].videos.upload({ attributes: { name: 'video 2 server 2', privacy: VideoPrivacy.PRIVATE } })
656 video2Server2UUID = uuid 656 video2Server2UUID = uuid
657 657
658 // Wait transcoding before federation 658 // Wait transcoding before federation
659 await waitJobs(servers) 659 await waitJobs(servers)
660 660
661 await servers[1].videosCommand.update({ id: video2Server2UUID, attributes: { privacy: VideoPrivacy.PUBLIC } }) 661 await servers[1].videos.update({ id: video2Server2UUID, attributes: { privacy: VideoPrivacy.PUBLIC } })
662 }) 662 })
663 663
664 it('Should cache video 2 webseeds on the first video', async function () { 664 it('Should cache video 2 webseeds on the first video', async function () {