PeerTube/server/tests/utils/request-schedulers.ts

21 lines
514 B
TypeScript
Raw Normal View History

2017-09-04 21:21:47 +02:00
import * as request from 'supertest'
import { ServerInfo } from '../utils'
function getRequestsStats (server: ServerInfo) {
const path = '/api/v1/request-schedulers/stats'
2017-09-04 21:21:47 +02:00
return request(server.url)
.get(path)
.set('Accept', 'application/json')
.set('Authorization', 'Bearer ' + server.accessToken)
2017-09-04 21:21:47 +02:00
.expect(200)
.expect('Content-Type', /json/)
}
// ---------------------------------------------------------------------------
export {
getRequestsStats
}