X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Flive.ts;h=2eff9414b362ebade7733d1f5fcf55cccb3ff764;hb=8d1f78044ca6eb9995001d3ab83be62460e043a6;hp=3f553c42bf3f92d436d6662e15947ef90678ed96;hpb=bbd5aa7ead5f1554a0872963f957effc26d8c630;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts index 3f553c42b..2eff9414b 100644 --- a/server/tests/api/check-params/live.ts +++ b/server/tests/api/check-params/live.ts @@ -502,6 +502,23 @@ describe('Test video lives API validator', function () { await stopFfmpeg(ffmpegCommand) }) + it('Should fail to change live privacy if it has already started', async function () { + this.timeout(40000) + + const live = await command.get({ videoId: video.id }) + + const ffmpegCommand = sendRTMPStream({ rtmpBaseUrl: live.rtmpUrl, streamKey: live.streamKey }) + + await command.waitUntilPublished({ videoId: video.id }) + await server.videos.update({ + id: video.id, + attributes: { privacy: VideoPrivacy.PUBLIC }, + expectedStatus: HttpStatusCode.BAD_REQUEST_400 + }) + + await stopFfmpeg(ffmpegCommand) + }) + it('Should fail to stream twice in the save live', async function () { this.timeout(40000)