aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/plugin-transcoding.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 10:33:49 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commitae2abfd3aed3e75d39a316b49b914d187faa7475 (patch)
tree4d5060dc310f3d8cdcd5829779522f49b3d10e71 /server/tests/plugins/plugin-transcoding.ts
parent9c6327f803aaf4200672f1fc40b2f43786daca47 (diff)
downloadPeerTube-ae2abfd3aed3e75d39a316b49b914d187faa7475.tar.gz
PeerTube-ae2abfd3aed3e75d39a316b49b914d187faa7475.tar.zst
PeerTube-ae2abfd3aed3e75d39a316b49b914d187faa7475.zip
Introduce plugins command
Diffstat (limited to 'server/tests/plugins/plugin-transcoding.ts')
-rw-r--r--server/tests/plugins/plugin-transcoding.ts26
1 files changed, 9 insertions, 17 deletions
diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts
index eefb2294d..f1ff91077 100644
--- a/server/tests/plugins/plugin-transcoding.ts
+++ b/server/tests/plugins/plugin-transcoding.ts
@@ -4,25 +4,25 @@ import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { join } from 'path' 5import { join } from 'path'
6import { getAudioStream, getVideoFileFPS, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' 6import { getAudioStream, getVideoFileFPS, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils'
7import { ServerConfig, VideoDetails, VideoPrivacy } from '@shared/models'
8import { 7import {
9 buildServerDirectory, 8 buildServerDirectory,
9 cleanupTests,
10 createLive, 10 createLive,
11 flushAndRunServer,
11 getConfig, 12 getConfig,
12 getPluginTestPath,
13 getVideo, 13 getVideo,
14 installPlugin, 14 PluginsCommand,
15 sendRTMPStreamInVideo, 15 sendRTMPStreamInVideo,
16 ServerInfo,
16 setAccessTokensToServers, 17 setAccessTokensToServers,
17 setDefaultVideoChannel, 18 setDefaultVideoChannel,
18 testFfmpegStreamError, 19 testFfmpegStreamError,
19 uninstallPlugin,
20 updateCustomSubConfig, 20 updateCustomSubConfig,
21 uploadVideoAndGetId, 21 uploadVideoAndGetId,
22 waitJobs, 22 waitJobs,
23 waitUntilLivePublished 23 waitUntilLivePublished
24} from '../../../shared/extra-utils' 24} from '@shared/extra-utils'
25import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../shared/extra-utils/server/servers' 25import { ServerConfig, VideoDetails, VideoPrivacy } from '@shared/models'
26 26
27async function createLiveWrapper (server: ServerInfo) { 27async function createLiveWrapper (server: ServerInfo) {
28 const liveAttributes = { 28 const liveAttributes = {
@@ -109,11 +109,7 @@ describe('Test transcoding plugins', function () {
109 } 109 }
110 110
111 before(async function () { 111 before(async function () {
112 await installPlugin({ 112 await server.pluginsCommand.install({ path: PluginsCommand.getPluginTestPath('-transcoding-one') })
113 url: server.url,
114 accessToken: server.accessToken,
115 path: getPluginTestPath('-transcoding-one')
116 })
117 }) 113 })
118 114
119 it('Should have the appropriate available profiles', async function () { 115 it('Should have the appropriate available profiles', async function () {
@@ -225,7 +221,7 @@ describe('Test transcoding plugins', function () {
225 it('Should default to the default profile if the specified profile does not exist', async function () { 221 it('Should default to the default profile if the specified profile does not exist', async function () {
226 this.timeout(240000) 222 this.timeout(240000)
227 223
228 await uninstallPlugin({ url: server.url, accessToken: server.accessToken, npmName: 'peertube-plugin-test-transcoding-one' }) 224 await server.pluginsCommand.uninstall({ npmName: 'peertube-plugin-test-transcoding-one' })
229 225
230 const res = await getConfig(server.url) 226 const res = await getConfig(server.url)
231 const config = res.body as ServerConfig 227 const config = res.body as ServerConfig
@@ -244,11 +240,7 @@ describe('Test transcoding plugins', function () {
244 describe('When using a plugin adding new encoders', function () { 240 describe('When using a plugin adding new encoders', function () {
245 241
246 before(async function () { 242 before(async function () {
247 await installPlugin({ 243 await server.pluginsCommand.install({ path: PluginsCommand.getPluginTestPath('-transcoding-two') })
248 url: server.url,
249 accessToken: server.accessToken,
250 path: getPluginTestPath('-transcoding-two')
251 })
252 244
253 await updateConf(server, 'test-vod-profile', 'test-live-profile') 245 await updateConf(server, 'test-vod-profile', 'test-live-profile')
254 }) 246 })