diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-13 14:23:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (patch) | |
tree | 7a166515e4d57a06eb3c08be569f106ed049988b /server/tests/api/videos/resumable-upload.ts | |
parent | d0a0fa429d4651710ed951a3c11af0219e408964 (diff) | |
download | PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.gz PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.zst PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.zip |
Introduce user command
Diffstat (limited to 'server/tests/api/videos/resumable-upload.ts')
-rw-r--r-- | server/tests/api/videos/resumable-upload.ts | 17 |
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' |
20 | import { MyUser, VideoPrivacy } from '@shared/models' | 18 | import { VideoPrivacy } from '@shared/models' |
21 | 19 | ||
22 | const expect = chai.expect | 20 | const 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 () { |