aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-13 09:38:19 +0100
committerChocobozzz <me@florianbigard.com>2021-01-13 09:38:19 +0100
commit78d62f4d182be2f72f4901c38a0d10bb147896e8 (patch)
treed68b591387a526b235311fc5ec3a2d6f871a071b /shared
parent9bb720f3f96d781d5e132220ace4515e779cea3c (diff)
downloadPeerTube-78d62f4d182be2f72f4901c38a0d10bb147896e8.tar.gz
PeerTube-78d62f4d182be2f72f4901c38a0d10bb147896e8.tar.zst
PeerTube-78d62f4d182be2f72f4901c38a0d10bb147896e8.zip
Fix and add skipping ping log tests
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/server/servers.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts
index 5e1de6ece..6ab7bee90 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/extra-utils/server/servers.ts
@@ -7,6 +7,7 @@ import { 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 { buildServerDirectory, getFileSize, isGithubCI, root, wait } from '../miscs/miscs' 9import { buildServerDirectory, getFileSize, isGithubCI, root, wait } from '../miscs/miscs'
10import { makeGetRequest } from '../requests/requests'
10 11
11interface ServerInfo { 12interface ServerInfo {
12 app: ChildProcess 13 app: ChildProcess
@@ -347,6 +348,14 @@ async function getServerFileSize (server: ServerInfo, subPath: string) {
347 return getFileSize(path) 348 return getFileSize(path)
348} 349}
349 350
351function makePingRequest (server: ServerInfo) {
352 return makeGetRequest({
353 url: server.url,
354 path: '/api/v1/ping',
355 statusCodeExpected: 200
356 })
357}
358
350// --------------------------------------------------------------------------- 359// ---------------------------------------------------------------------------
351 360
352export { 361export {
@@ -358,6 +367,7 @@ export {
358 cleanupTests, 367 cleanupTests,
359 flushAndRunMultipleServers, 368 flushAndRunMultipleServers,
360 flushTests, 369 flushTests,
370 makePingRequest,
361 flushAndRunServer, 371 flushAndRunServer,
362 killallServers, 372 killallServers,
363 reRunServer, 373 reRunServer,