updateLive,
uploadVideoAndGetId,
userLogin,
- waitUntilLiveStarts
+ waitUntilLivePublished
} from '../../../../shared/extra-utils'
import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
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 })
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 })
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 })
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 })
})
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)