1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Fix and add skipping ping log tests

This commit is contained in:
Chocobozzz 2021-01-13 09:38:19 +01:00
parent 9bb720f3f9
commit 78d62f4d18
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 41 additions and 4 deletions

View file

@ -7,6 +7,7 @@ import { join } from 'path'
import { randomInt } from '../../core-utils/miscs/miscs'
import { VideoChannel } from '../../models/videos'
import { buildServerDirectory, getFileSize, isGithubCI, root, wait } from '../miscs/miscs'
import { makeGetRequest } from '../requests/requests'
interface ServerInfo {
app: ChildProcess
@ -347,6 +348,14 @@ async function getServerFileSize (server: ServerInfo, subPath: string) {
return getFileSize(path)
}
function makePingRequest (server: ServerInfo) {
return makeGetRequest({
url: server.url,
path: '/api/v1/ping',
statusCodeExpected: 200
})
}
// ---------------------------------------------------------------------------
export {
@ -358,6 +367,7 @@ export {
cleanupTests,
flushAndRunMultipleServers,
flushTests,
makePingRequest,
flushAndRunServer,
killallServers,
reRunServer,