aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli')
-rw-r--r--server/tests/cli/create-transcoding-job.ts5
-rw-r--r--server/tests/cli/plugins.ts8
2 files changed, 4 insertions, 9 deletions
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index be46dec25..e3211882d 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -10,7 +10,6 @@ import {
10 getVideosList, 10 getVideosList,
11 ServerInfo, 11 ServerInfo,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 updateCustomSubConfig,
14 uploadVideo 13 uploadVideo
15} from '../../../shared/extra-utils' 14} from '../../../shared/extra-utils'
16import { waitJobs } from '../../../shared/extra-utils/server/jobs' 15import { waitJobs } from '../../../shared/extra-utils/server/jobs'
@@ -47,7 +46,7 @@ describe('Test create transcoding jobs', function () {
47 servers = await flushAndRunMultipleServers(2) 46 servers = await flushAndRunMultipleServers(2)
48 await setAccessTokensToServers(servers) 47 await setAccessTokensToServers(servers)
49 48
50 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, config) 49 await servers[0].configCommand.updateCustomSubConfig({ newConfig: config })
51 50
52 await doubleFollow(servers[0], servers[1]) 51 await doubleFollow(servers[0], servers[1])
53 52
@@ -199,7 +198,7 @@ describe('Test create transcoding jobs', function () {
199 this.timeout(120000) 198 this.timeout(120000)
200 199
201 config.transcoding.hls.enabled = true 200 config.transcoding.hls.enabled = true
202 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, config) 201 await servers[0].configCommand.updateCustomSubConfig({ newConfig: config })
203 202
204 await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[4]}`) 203 await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[4]}`)
205 204
diff --git a/server/tests/cli/plugins.ts b/server/tests/cli/plugins.ts
index 7b8746a5d..e5efae36b 100644
--- a/server/tests/cli/plugins.ts
+++ b/server/tests/cli/plugins.ts
@@ -5,14 +5,12 @@ import { expect } from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 flushAndRunServer, 7 flushAndRunServer,
8 getConfig,
9 killallServers, 8 killallServers,
10 PluginsCommand, 9 PluginsCommand,
11 reRunServer, 10 reRunServer,
12 ServerInfo, 11 ServerInfo,
13 setAccessTokensToServers 12 setAccessTokensToServers
14} from '../../../shared/extra-utils' 13} from '../../../shared/extra-utils'
15import { ServerConfig } from '../../../shared/models/server'
16 14
17describe('Test plugin scripts', function () { 15describe('Test plugin scripts', function () {
18 let server: ServerInfo 16 let server: ServerInfo
@@ -44,8 +42,7 @@ describe('Test plugin scripts', function () {
44 killallServers([ server ]) 42 killallServers([ server ])
45 await reRunServer(server) 43 await reRunServer(server)
46 44
47 const res = await getConfig(server.url) 45 const config = await server.configCommand.getConfig()
48 const config: ServerConfig = res.body
49 46
50 const plugin = config.plugin.registered 47 const plugin = config.plugin.registered
51 .find(p => p.name === 'test') 48 .find(p => p.name === 'test')
@@ -68,8 +65,7 @@ describe('Test plugin scripts', function () {
68 killallServers([ server ]) 65 killallServers([ server ])
69 await reRunServer(server) 66 await reRunServer(server)
70 67
71 const res = await getConfig(server.url) 68 const config = await server.configCommand.getConfig()
72 const config: ServerConfig = res.body
73 69
74 const plugin = config.plugin.registered 70 const plugin = config.plugin.registered
75 .find(p => p.name === 'test') 71 .find(p => p.name === 'test')