From 65e6e2602c0d5521f3a6740f7469bb92830ecb53 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Jul 2021 11:51:09 +0200 Subject: Introduce config command --- server/tests/cli/create-transcoding-job.ts | 5 ++--- server/tests/cli/plugins.ts | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'server/tests/cli') 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 { getVideosList, ServerInfo, setAccessTokensToServers, - updateCustomSubConfig, uploadVideo } from '../../../shared/extra-utils' import { waitJobs } from '../../../shared/extra-utils/server/jobs' @@ -47,7 +46,7 @@ describe('Test create transcoding jobs', function () { servers = await flushAndRunMultipleServers(2) await setAccessTokensToServers(servers) - await updateCustomSubConfig(servers[0].url, servers[0].accessToken, config) + await servers[0].configCommand.updateCustomSubConfig({ newConfig: config }) await doubleFollow(servers[0], servers[1]) @@ -199,7 +198,7 @@ describe('Test create transcoding jobs', function () { this.timeout(120000) config.transcoding.hls.enabled = true - await updateCustomSubConfig(servers[0].url, servers[0].accessToken, config) + await servers[0].configCommand.updateCustomSubConfig({ newConfig: config }) await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[4]}`) 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' import { cleanupTests, flushAndRunServer, - getConfig, killallServers, PluginsCommand, reRunServer, ServerInfo, setAccessTokensToServers } from '../../../shared/extra-utils' -import { ServerConfig } from '../../../shared/models/server' describe('Test plugin scripts', function () { let server: ServerInfo @@ -44,8 +42,7 @@ describe('Test plugin scripts', function () { killallServers([ server ]) await reRunServer(server) - const res = await getConfig(server.url) - const config: ServerConfig = res.body + const config = await server.configCommand.getConfig() const plugin = config.plugin.registered .find(p => p.name === 'test') @@ -68,8 +65,7 @@ describe('Test plugin scripts', function () { killallServers([ server ]) await reRunServer(server) - const res = await getConfig(server.url) - const config: ServerConfig = res.body + const config = await server.configCommand.getConfig() const plugin = config.plugin.registered .find(p => p.name === 'test') -- cgit v1.2.3