diff options
Diffstat (limited to 'shared/extra-utils/server/servers.ts')
-rw-r--r-- | shared/extra-utils/server/servers.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts index 6140cebb5..a647b0eb4 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' | |||
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | import { randomInt } from '../../core-utils/miscs/miscs' | 7 | import { randomInt } from '../../core-utils/miscs/miscs' |
8 | import { VideoChannel } from '../../models/videos' | 8 | import { VideoChannel } from '../../models/videos' |
9 | import { root, wait } from '../miscs/miscs' | 9 | import { getFileSize, root, wait } from '../miscs/miscs' |
10 | 10 | ||
11 | interface ServerInfo { | 11 | interface ServerInfo { |
12 | app: ChildProcess | 12 | app: ChildProcess |
@@ -318,11 +318,18 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictC | |||
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | async function getServerFileSize (server: ServerInfo, subPath: string) { | ||
322 | const path = join(root(), 'test' + server.internalServerNumber, subPath) | ||
323 | |||
324 | return getFileSize(path) | ||
325 | } | ||
326 | |||
321 | // --------------------------------------------------------------------------- | 327 | // --------------------------------------------------------------------------- |
322 | 328 | ||
323 | export { | 329 | export { |
324 | checkDirectoryIsEmpty, | 330 | checkDirectoryIsEmpty, |
325 | checkTmpIsEmpty, | 331 | checkTmpIsEmpty, |
332 | getServerFileSize, | ||
326 | ServerInfo, | 333 | ServerInfo, |
327 | parallelTests, | 334 | parallelTests, |
328 | cleanupTests, | 335 | cleanupTests, |