aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/tests/utils/request-schedulers.ts
blob: f100f6d991bbbda98952daf36be9723290027df9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                    



                                                 



                                            
                                                               








                                                                              
import * as request from 'supertest'

import { ServerInfo } from '../utils'

function getRequestsStats (server: ServerInfo) {
  const path = '/api/v1/request-schedulers/stats'

  return request(server.url)
          .get(path)
          .set('Accept', 'application/json')
          .set('Authorization', 'Bearer ' + server.accessToken)
          .expect(200)
          .expect('Content-Type', /json/)
}

// ---------------------------------------------------------------------------

export {
  getRequestsStats
}