aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/test-live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tools/test-live.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tools/test-live.ts')
-rw-r--r--server/tools/test-live.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tools/test-live.ts b/server/tools/test-live.ts
index bc31b6926..0cb0c3668 100644
--- a/server/tools/test-live.ts
+++ b/server/tools/test-live.ts
@@ -1,10 +1,10 @@
1import { program } from 'commander' 1import { program } from 'commander'
2import { LiveVideoCreate, VideoPrivacy } from '@shared/models' 2import { LiveVideoCreate, VideoPrivacy } from '@shared/models'
3import { 3import {
4 flushAndRunServer, 4 createSingleServer,
5 killallServers, 5 killallServers,
6 sendRTMPStream, 6 sendRTMPStream,
7 ServerInfo, 7 PeerTubeServer,
8 setAccessTokensToServers, 8 setAccessTokensToServers,
9 setDefaultVideoChannel 9 setDefaultVideoChannel
10} from '../../shared/extra-utils' 10} from '../../shared/extra-utils'
@@ -36,7 +36,7 @@ async function run () {
36 36
37 console.log('Starting server.') 37 console.log('Starting server.')
38 38
39 const server = await flushAndRunServer(1, {}, [], { hideLogs: false, execArgv: [ '--inspect' ] }) 39 const server = await createSingleServer(1, {}, [], { hideLogs: false, execArgv: [ '--inspect' ] })
40 40
41 const cleanup = async () => { 41 const cleanup = async () => {
42 console.log('Killing server') 42 console.log('Killing server')
@@ -81,7 +81,7 @@ async function run () {
81 81
82// ---------------------------------------------------------------------------- 82// ----------------------------------------------------------------------------
83 83
84async function buildConfig (server: ServerInfo, commandType: CommandType) { 84async function buildConfig (server: PeerTubeServer, commandType: CommandType) {
85 await server.config.updateCustomSubConfig({ 85 await server.config.updateCustomSubConfig({
86 newConfig: { 86 newConfig: {
87 instance: { 87 instance: {