]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/live.ts
Merge branch 'develop' into shorter-URLs-channels-accounts
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / live.ts
index 40dca908b8ab35e1813d36b7135866198f44fac0..c171b1f811918a2629492b195dc757b6d5af57a7 100644 (file)
@@ -22,7 +22,7 @@ import {
   updateLive,
   uploadVideoAndGetId,
   userLogin,
-  waitUntilLiveStarts
+  waitUntilLivePublished
 } from '../../../../shared/extra-utils'
 import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
 
@@ -180,7 +180,7 @@ describe('Test video lives API validator', function () {
     it('Should fail with an incorrect thumbnail file', async function () {
       const fields = baseCorrectParams
       const attaches = {
-        thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
+        thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
       }
 
       await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
@@ -189,7 +189,7 @@ describe('Test video lives API validator', function () {
     it('Should fail with a big thumbnail file', async function () {
       const fields = baseCorrectParams
       const attaches = {
-        thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
+        thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png')
       }
 
       await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
@@ -198,7 +198,7 @@ describe('Test video lives API validator', function () {
     it('Should fail with an incorrect preview file', async function () {
       const fields = baseCorrectParams
       const attaches = {
-        previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
+        previewfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
       }
 
       await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
@@ -207,7 +207,7 @@ describe('Test video lives API validator', function () {
     it('Should fail with a big preview file', async function () {
       const fields = baseCorrectParams
       const attaches = {
-        previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
+        previewfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png')
       }
 
       await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
@@ -402,28 +402,28 @@ describe('Test video lives API validator', function () {
     })
 
     it('Should fail to update a live if it has already started', async function () {
-      this.timeout(20000)
+      this.timeout(40000)
 
       const resLive = await getLive(server.url, server.accessToken, videoId)
       const live: LiveVideo = resLive.body
 
       const command = sendRTMPStream(live.rtmpUrl, live.streamKey)
 
-      await waitUntilLiveStarts(server.url, server.accessToken, videoId)
+      await waitUntilLivePublished(server.url, server.accessToken, videoId)
       await updateLive(server.url, server.accessToken, videoId, {}, HttpStatusCode.BAD_REQUEST_400)
 
       await stopFfmpeg(command)
     })
 
     it('Should fail to stream twice in the save live', async function () {
-      this.timeout(30000)
+      this.timeout(40000)
 
       const resLive = await getLive(server.url, server.accessToken, videoId)
       const live: LiveVideo = resLive.body
 
       const command = sendRTMPStream(live.rtmpUrl, live.streamKey)
 
-      await waitUntilLiveStarts(server.url, server.accessToken, videoId)
+      await waitUntilLivePublished(server.url, server.accessToken, videoId)
 
       await runAndTestFfmpegStreamError(server.url, server.accessToken, videoId, true)