diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 11:51:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 65e6e2602c0d5521f3a6740f7469bb92830ecb53 (patch) | |
tree | f89024ffff1dafb0281ee2fe028e89b95101bd44 /server/tests/cli | |
parent | bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (diff) | |
download | PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.gz PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.zst PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.zip |
Introduce config command
Diffstat (limited to 'server/tests/cli')
-rw-r--r-- | server/tests/cli/create-transcoding-job.ts | 5 | ||||
-rw-r--r-- | server/tests/cli/plugins.ts | 8 |
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' |
16 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' | 15 | import { 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' | |||
5 | import { | 5 | import { |
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' |
15 | import { ServerConfig } from '../../../shared/models/server' | ||
16 | 14 | ||
17 | describe('Test plugin scripts', function () { | 15 | describe('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') |