aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/check-params/live.ts
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'server/tests/api/check-params/live.ts')
-rw-r--r--server/tests/api/check-params/live.ts30
1 files changed, 15 insertions, 15 deletions
diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts
index 4b54fc31c..20f27dd1d 100644
--- a/server/tests/api/check-params/live.ts
+++ b/server/tests/api/check-params/live.ts
@@ -35,7 +35,7 @@ describe('Test video lives API validator', function () {
35 35
36 await setAccessTokensToServers([ server ]) 36 await setAccessTokensToServers([ server ])
37 37
38 await server.configCommand.updateCustomSubConfig({ 38 await server.config.updateCustomSubConfig({
39 newConfig: { 39 newConfig: {
40 live: { 40 live: {
41 enabled: true, 41 enabled: true,
@@ -48,19 +48,19 @@ describe('Test video lives API validator', function () {
48 48
49 const username = 'user1' 49 const username = 'user1'
50 const password = 'my super password' 50 const password = 'my super password'
51 await server.usersCommand.create({ username: username, password: password }) 51 await server.users.create({ username: username, password: password })
52 userAccessToken = await server.loginCommand.getAccessToken({ username, password }) 52 userAccessToken = await server.login.getAccessToken({ username, password })
53 53
54 { 54 {
55 const { videoChannels } = await server.usersCommand.getMyInfo() 55 const { videoChannels } = await server.users.getMyInfo()
56 channelId = videoChannels[0].id 56 channelId = videoChannels[0].id
57 } 57 }
58 58
59 { 59 {
60 videoIdNotLive = (await server.videosCommand.quickUpload({ name: 'not live' })).id 60 videoIdNotLive = (await server.videos.quickUpload({ name: 'not live' })).id
61 } 61 }
62 62
63 command = server.liveCommand 63 command = server.live
64 }) 64 })
65 65
66 describe('When creating a live', function () { 66 describe('When creating a live', function () {
@@ -144,10 +144,10 @@ describe('Test video lives API validator', function () {
144 username: 'fake', 144 username: 'fake',
145 password: 'fake_password' 145 password: 'fake_password'
146 } 146 }
147 await server.usersCommand.create({ username: user.username, password: user.password }) 147 await server.users.create({ username: user.username, password: user.password })
148 148
149 const accessTokenUser = await server.loginCommand.getAccessToken(user) 149 const accessTokenUser = await server.login.getAccessToken(user)
150 const { videoChannels } = await server.usersCommand.getMyInfo({ token: accessTokenUser }) 150 const { videoChannels } = await server.users.getMyInfo({ token: accessTokenUser })
151 const customChannelId = videoChannels[0].id 151 const customChannelId = videoChannels[0].id
152 152
153 const fields = { ...baseCorrectParams, channelId: customChannelId } 153 const fields = { ...baseCorrectParams, channelId: customChannelId }
@@ -230,7 +230,7 @@ describe('Test video lives API validator', function () {
230 }) 230 })
231 231
232 it('Should forbid if live is disabled', async function () { 232 it('Should forbid if live is disabled', async function () {
233 await server.configCommand.updateCustomSubConfig({ 233 await server.config.updateCustomSubConfig({
234 newConfig: { 234 newConfig: {
235 live: { 235 live: {
236 enabled: false 236 enabled: false
@@ -250,7 +250,7 @@ describe('Test video lives API validator', function () {
250 it('Should forbid to save replay if not enabled by the admin', async function () { 250 it('Should forbid to save replay if not enabled by the admin', async function () {
251 const fields = { ...baseCorrectParams, saveReplay: true } 251 const fields = { ...baseCorrectParams, saveReplay: true }
252 252
253 await server.configCommand.updateCustomSubConfig({ 253 await server.config.updateCustomSubConfig({
254 newConfig: { 254 newConfig: {
255 live: { 255 live: {
256 enabled: true, 256 enabled: true,
@@ -271,7 +271,7 @@ describe('Test video lives API validator', function () {
271 it('Should allow to save replay if enabled by the admin', async function () { 271 it('Should allow to save replay if enabled by the admin', async function () {
272 const fields = { ...baseCorrectParams, saveReplay: true } 272 const fields = { ...baseCorrectParams, saveReplay: true }
273 273
274 await server.configCommand.updateCustomSubConfig({ 274 await server.config.updateCustomSubConfig({
275 newConfig: { 275 newConfig: {
276 live: { 276 live: {
277 enabled: true, 277 enabled: true,
@@ -290,7 +290,7 @@ describe('Test video lives API validator', function () {
290 }) 290 })
291 291
292 it('Should not allow live if max instance lives is reached', async function () { 292 it('Should not allow live if max instance lives is reached', async function () {
293 await server.configCommand.updateCustomSubConfig({ 293 await server.config.updateCustomSubConfig({
294 newConfig: { 294 newConfig: {
295 live: { 295 live: {
296 enabled: true, 296 enabled: true,
@@ -309,7 +309,7 @@ describe('Test video lives API validator', function () {
309 }) 309 })
310 310
311 it('Should not allow live if max user lives is reached', async function () { 311 it('Should not allow live if max user lives is reached', async function () {
312 await server.configCommand.updateCustomSubConfig({ 312 await server.config.updateCustomSubConfig({
313 newConfig: { 313 newConfig: {
314 live: { 314 live: {
315 enabled: true, 315 enabled: true,
@@ -401,7 +401,7 @@ describe('Test video lives API validator', function () {
401 }) 401 })
402 402
403 it('Should fail to update replay status if replay is not allowed on the instance', async function () { 403 it('Should fail to update replay status if replay is not allowed on the instance', async function () {
404 await server.configCommand.updateCustomSubConfig({ 404 await server.config.updateCustomSubConfig({
405 newConfig: { 405 newConfig: {
406 live: { 406 live: {
407 enabled: true, 407 enabled: true,