aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy/manage-redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/redundancy/manage-redundancy.ts')
-rw-r--r--server/tests/api/redundancy/manage-redundancy.ts15
1 files changed, 6 insertions, 9 deletions
diff --git a/server/tests/api/redundancy/manage-redundancy.ts b/server/tests/api/redundancy/manage-redundancy.ts
index 03857f512..efb60dc56 100644
--- a/server/tests/api/redundancy/manage-redundancy.ts
+++ b/server/tests/api/redundancy/manage-redundancy.ts
@@ -6,12 +6,9 @@ import {
6 cleanupTests, 6 cleanupTests,
7 doubleFollow, 7 doubleFollow,
8 flushAndRunMultipleServers, 8 flushAndRunMultipleServers,
9 getLocalIdByUUID,
10 RedundancyCommand, 9 RedundancyCommand,
11 ServerInfo, 10 ServerInfo,
12 setAccessTokensToServers, 11 setAccessTokensToServers,
13 uploadVideo,
14 uploadVideoAndGetId,
15 waitJobs 12 waitJobs
16} from '@shared/extra-utils' 13} from '@shared/extra-utils'
17import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models' 14import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models'
@@ -59,13 +56,13 @@ describe('Test manage videos redundancy', function () {
59 commands = servers.map(s => s.redundancyCommand) 56 commands = servers.map(s => s.redundancyCommand)
60 57
61 { 58 {
62 const res = await uploadVideo(servers[1].url, servers[1].accessToken, { name: 'video 1 server 2' }) 59 const { uuid } = await servers[1].videosCommand.upload({ attributes: { name: 'video 1 server 2' } })
63 video1Server2UUID = res.body.video.uuid 60 video1Server2UUID = uuid
64 } 61 }
65 62
66 { 63 {
67 const res = await uploadVideo(servers[1].url, servers[1].accessToken, { name: 'video 2 server 2' }) 64 const { uuid } = await servers[1].videosCommand.upload({ attributes: { name: 'video 2 server 2' } })
68 video2Server2UUID = res.body.video.uuid 65 video2Server2UUID = uuid
69 } 66 }
70 67
71 await waitJobs(servers) 68 await waitJobs(servers)
@@ -206,9 +203,9 @@ describe('Test manage videos redundancy', function () {
206 it('Should manually add a redundancy and list it', async function () { 203 it('Should manually add a redundancy and list it', async function () {
207 this.timeout(120000) 204 this.timeout(120000)
208 205
209 const uuid = (await uploadVideoAndGetId({ server: servers[1], videoName: 'video 3 server 2', privacy: VideoPrivacy.UNLISTED })).uuid 206 const uuid = (await servers[1].videosCommand.quickUpload({ name: 'video 3 server 2', privacy: VideoPrivacy.UNLISTED })).uuid
210 await waitJobs(servers) 207 await waitJobs(servers)
211 const videoId = await getLocalIdByUUID(servers[0].url, uuid) 208 const videoId = await servers[0].videosCommand.getId({ uuid })
212 209
213 await commands[0].addVideo({ videoId }) 210 await commands[0].addVideo({ videoId })
214 211