From d2351bcfd4cfed4b728df170593e0c6b66aa6762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Le=20Calvar?= Date: Tue, 6 Apr 2021 15:12:38 +0200 Subject: add tests for inputOptions and videoFilters in trancode plugins --- server/tests/plugins/plugin-transcoding.ts | 40 ++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'server/tests/plugins') diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts index ecea21e69..415705ca1 100644 --- a/server/tests/plugins/plugin-transcoding.ts +++ b/server/tests/plugins/plugin-transcoding.ts @@ -119,8 +119,8 @@ describe('Test transcoding plugins', function () { const res = await getConfig(server.url) const config = res.body as ServerConfig - expect(config.transcoding.availableProfiles).to.have.members([ 'default', 'low-vod' ]) - expect(config.live.transcoding.availableProfiles).to.have.members([ 'default', 'low-live' ]) + expect(config.transcoding.availableProfiles).to.have.members([ 'default', 'low-vod', 'video-filters-vod', 'input-options-vod' ]) + expect(config.live.transcoding.availableProfiles).to.have.members([ 'default', 'low-live', 'input-options-live' ]) }) it('Should not use the plugin profile if not chosen by the admin', async function () { @@ -143,6 +143,28 @@ describe('Test transcoding plugins', function () { await checkVideoFPS(videoUUID, 'below', 12) }) + it('Should apply video filters in vod profile', async function () { + this.timeout(120000) + + await updateConf(server, 'video-filters-vod', 'default') + + const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video' })).uuid + await waitJobs([ server ]) + + await checkVideoFPS(videoUUID, 'below', 12) + }) + + it('Should apply input options in vod profile', async function () { + this.timeout(120000) + + await updateConf(server, 'input-options-vod', 'default') + + const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video' })).uuid + await waitJobs([ server ]) + + await checkVideoFPS(videoUUID, 'below', 6) + }) + it('Should not use the plugin profile if not chosen by the admin', async function () { this.timeout(120000) @@ -169,6 +191,20 @@ describe('Test transcoding plugins', function () { await checkLiveFPS(liveVideoId, 'below', 12) }) + it('Should apply the input options on live profile', async function () { + this.timeout(120000) + + await updateConf(server, 'low-vod', 'input-options-live') + + const liveVideoId = await createLiveWrapper(server) + + await sendRTMPStreamInVideo(server.url, server.accessToken, liveVideoId, 'video_short2.webm') + await waitUntilLivePublished(server.url, server.accessToken, liveVideoId) + await waitJobs([ server ]) + + await checkLiveFPS(liveVideoId, 'below', 6) + }) + it('Should default to the default profile if the specified profile does not exist', async function () { this.timeout(120000) -- cgit v1.2.3