diff options
Diffstat (limited to 'server/tests/plugins/plugin-transcoding.ts')
-rw-r--r-- | server/tests/plugins/plugin-transcoding.ts | 26 |
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' | |||
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { getAudioStream, getVideoFileFPS, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' | 6 | import { getAudioStream, getVideoFileFPS, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' |
7 | import { ServerConfig, VideoDetails, VideoPrivacy } from '@shared/models' | ||
8 | import { | 7 | import { |
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' |
25 | import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../shared/extra-utils/server/servers' | 25 | import { ServerConfig, VideoDetails, VideoPrivacy } from '@shared/models' |
26 | 26 | ||
27 | async function createLiveWrapper (server: ServerInfo) { | 27 | async 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 | }) |