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.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/tests/api/redundancy/redundancy-constraints.ts b/server/tests/api/redundancy/redundancy-constraints.ts
index a31278de7..b3f6ed160 100644
--- a/server/tests/api/redundancy/redundancy-constraints.ts
+++ b/server/tests/api/redundancy/redundancy-constraints.ts
@@ -9,8 +9,6 @@ import {
9 reRunServer, 9 reRunServer,
10 ServerInfo, 10 ServerInfo,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 updateVideo,
13 uploadVideo,
14 waitJobs 12 waitJobs
15} from '@shared/extra-utils' 13} from '@shared/extra-utils'
16import { VideoPrivacy } from '@shared/models' 14import { VideoPrivacy } from '@shared/models'
@@ -38,11 +36,11 @@ describe('Test redundancy constraints', function () {
38 36
39 async function uploadWrapper (videoName: string) { 37 async function uploadWrapper (videoName: string) {
40 // Wait for transcoding 38 // Wait for transcoding
41 const res = await uploadVideo(localServer.url, localServer.accessToken, { name: 'to transcode', privacy: VideoPrivacy.PRIVATE }) 39 const { id } = await localServer.videosCommand.upload({ attributes: { name: 'to transcode', privacy: VideoPrivacy.PRIVATE } })
42 await waitJobs([ localServer ]) 40 await waitJobs([ localServer ])
43 41
44 // Update video to schedule a federation 42 // Update video to schedule a federation
45 await updateVideo(localServer.url, localServer.accessToken, res.body.video.id, { name: videoName, privacy: VideoPrivacy.PUBLIC }) 43 await localServer.videosCommand.update({ id, attributes: { name: videoName, privacy: VideoPrivacy.PUBLIC } })
46 } 44 }
47 45
48 async function getTotalRedundanciesLocalServer () { 46 async function getTotalRedundanciesLocalServer () {
@@ -80,7 +78,7 @@ describe('Test redundancy constraints', function () {
80 // Get the access tokens 78 // Get the access tokens
81 await setAccessTokensToServers(servers) 79 await setAccessTokensToServers(servers)
82 80
83 await uploadVideo(localServer.url, localServer.accessToken, { name: 'video 1 server 2' }) 81 await localServer.videosCommand.upload({ attributes: { name: 'video 1 server 2' } })
84 82
85 await waitJobs(servers) 83 await waitJobs(servers)
86 84