aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/servers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-24 15:22:56 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 10:07:51 +0100
commitca5c612bfdd225433bcc6ace01c8024df3f674ba (patch)
tree1b722cc346c9079c65338f0792ce7bcd2a20f8a0 /shared/extra-utils/server/servers.ts
parent5a547f69d5dc5867e253f7721513479c754b4f15 (diff)
downloadPeerTube-ca5c612bfdd225433bcc6ace01c8024df3f674ba.tar.gz
PeerTube-ca5c612bfdd225433bcc6ace01c8024df3f674ba.tar.zst
PeerTube-ca5c612bfdd225433bcc6ace01c8024df3f674ba.zip
Add live transcoding bit rate tests
Diffstat (limited to 'shared/extra-utils/server/servers.ts')
-rw-r--r--shared/extra-utils/server/servers.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts
index 75e79cc41..1126a7d93 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/extra-utils/server/servers.ts
@@ -6,7 +6,7 @@ import { copy, pathExists, readdir, readFile, remove } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { randomInt } from '../../core-utils/miscs/miscs' 7import { randomInt } from '../../core-utils/miscs/miscs'
8import { VideoChannel } from '../../models/videos' 8import { VideoChannel } from '../../models/videos'
9import { getFileSize, root, wait } from '../miscs/miscs' 9import { buildServerDirectory, getFileSize, root, wait } from '../miscs/miscs'
10 10
11interface ServerInfo { 11interface ServerInfo {
12 app: ChildProcess 12 app: ChildProcess
@@ -309,7 +309,7 @@ function cleanupTests (servers: ServerInfo[]) {
309} 309}
310 310
311async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictCount = true) { 311async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictCount = true) {
312 const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log') 312 const logfile = buildServerDirectory(server, 'logs/peertube.log')
313 313
314 while (true) { 314 while (true) {
315 const buf = await readFile(logfile) 315 const buf = await readFile(logfile)
@@ -323,7 +323,7 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictC
323} 323}
324 324
325async function getServerFileSize (server: ServerInfo, subPath: string) { 325async function getServerFileSize (server: ServerInfo, subPath: string) {
326 const path = join(root(), 'test' + server.internalServerNumber, subPath) 326 const path = buildServerDirectory(server, subPath)
327 327
328 return getFileSize(path) 328 return getFileSize(path)
329} 329}