2017-09-04 21:21:47 +02:00
|
|
|
import * as request from 'supertest'
|
|
|
|
|
2017-09-08 17:10:57 +02:00
|
|
|
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')
|
2017-09-08 17:10:57 +02:00
|
|
|
.set('Authorization', 'Bearer ' + server.accessToken)
|
2017-09-04 21:21:47 +02:00
|
|
|
.expect(200)
|
|
|
|
.expect('Content-Type', /json/)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export {
|
|
|
|
getRequestsStats
|
|
|
|
}
|