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