aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/resumable-upload.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/resumable-upload.ts')
-rw-r--r--server/tests/api/videos/resumable-upload.ts17
1 files changed, 5 insertions, 12 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index 5845efc86..642c115d0 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -9,15 +9,13 @@ import {
9 buildAbsoluteFixturePath, 9 buildAbsoluteFixturePath,
10 cleanupTests, 10 cleanupTests,
11 flushAndRunServer, 11 flushAndRunServer,
12 getMyUserInformation,
13 prepareResumableUpload, 12 prepareResumableUpload,
14 sendResumableChunks, 13 sendResumableChunks,
15 ServerInfo, 14 ServerInfo,
16 setAccessTokensToServers, 15 setAccessTokensToServers,
17 setDefaultVideoChannel, 16 setDefaultVideoChannel
18 updateUser
19} from '@shared/extra-utils' 17} from '@shared/extra-utils'
20import { MyUser, VideoPrivacy } from '@shared/models' 18import { VideoPrivacy } from '@shared/models'
21 19
22const expect = chai.expect 20const expect = chai.expect
23 21
@@ -109,15 +107,10 @@ describe('Test resumable upload', function () {
109 await setAccessTokensToServers([ server ]) 107 await setAccessTokensToServers([ server ])
110 await setDefaultVideoChannel([ server ]) 108 await setDefaultVideoChannel([ server ])
111 109
112 const res = await getMyUserInformation(server.url, server.accessToken) 110 const body = await server.usersCommand.getMyInfo()
113 rootId = (res.body as MyUser).id 111 rootId = body.id
114 112
115 await updateUser({ 113 await server.usersCommand.update({ userId: rootId, videoQuota: 10_000_000 })
116 url: server.url,
117 userId: rootId,
118 accessToken: server.accessToken,
119 videoQuota: 10_000_000
120 })
121 }) 114 })
122 115
123 describe('Directory cleaning', function () { 116 describe('Directory cleaning', function () {