1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Introduce user command

This commit is contained in:
Chocobozzz 2021-07-13 14:23:01 +02:00
parent d0a0fa429d
commit 7926c5f9b3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
85 changed files with 1011 additions and 1505 deletions

View file

@ -9,12 +9,10 @@ import {
ConfigCommand,
doubleFollow,
flushAndRunMultipleServers,
generateUser,
getVideo,
ServerInfo,
setAccessTokensToServers,
setDefaultVideoChannel,
updateUser,
wait,
waitJobs
} from '../../../../shared/extra-utils'
@ -58,9 +56,7 @@ describe('Test live constraints', function () {
}
function updateQuota (options: { total: number, daily: number }) {
return updateUser({
url: servers[0].url,
accessToken: servers[0].accessToken,
return servers[0].usersCommand.update({
userId,
videoQuota: options.total,
videoQuotaDaily: options.daily
@ -89,7 +85,7 @@ describe('Test live constraints', function () {
})
{
const res = await generateUser(servers[0], 'user1')
const res = await servers[0].usersCommand.generate('user1')
userId = res.userId
userChannelId = res.userChannelId
userAccessToken = res.token