aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live-constraints.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-13 14:23:01 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (patch)
tree7a166515e4d57a06eb3c08be569f106ed049988b /server/tests/api/live/live-constraints.ts
parentd0a0fa429d4651710ed951a3c11af0219e408964 (diff)
downloadPeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.gz
PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.tar.zst
PeerTube-7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0.zip
Introduce user command
Diffstat (limited to 'server/tests/api/live/live-constraints.ts')
-rw-r--r--server/tests/api/live/live-constraints.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts
index 46153f7b1..290d325d4 100644
--- a/server/tests/api/live/live-constraints.ts
+++ b/server/tests/api/live/live-constraints.ts
@@ -9,12 +9,10 @@ import {
9 ConfigCommand, 9 ConfigCommand,
10 doubleFollow, 10 doubleFollow,
11 flushAndRunMultipleServers, 11 flushAndRunMultipleServers,
12 generateUser,
13 getVideo, 12 getVideo,
14 ServerInfo, 13 ServerInfo,
15 setAccessTokensToServers, 14 setAccessTokensToServers,
16 setDefaultVideoChannel, 15 setDefaultVideoChannel,
17 updateUser,
18 wait, 16 wait,
19 waitJobs 17 waitJobs
20} from '../../../../shared/extra-utils' 18} from '../../../../shared/extra-utils'
@@ -58,9 +56,7 @@ describe('Test live constraints', function () {
58 } 56 }
59 57
60 function updateQuota (options: { total: number, daily: number }) { 58 function updateQuota (options: { total: number, daily: number }) {
61 return updateUser({ 59 return servers[0].usersCommand.update({
62 url: servers[0].url,
63 accessToken: servers[0].accessToken,
64 userId, 60 userId,
65 videoQuota: options.total, 61 videoQuota: options.total,
66 videoQuotaDaily: options.daily 62 videoQuotaDaily: options.daily
@@ -89,7 +85,7 @@ describe('Test live constraints', function () {
89 }) 85 })
90 86
91 { 87 {
92 const res = await generateUser(servers[0], 'user1') 88 const res = await servers[0].usersCommand.generate('user1')
93 userId = res.userId 89 userId = res.userId
94 userChannelId = res.userChannelId 90 userChannelId = res.userChannelId
95 userAccessToken = res.token 91 userAccessToken = res.token