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:
parent
9bb720f3f9
commit
78d62f4d18
3 changed files with 41 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue