]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/tests/utils/request-schedulers.js
Move video file metadata in their own table
[github/Chocobozzz/PeerTube.git] / server / tests / utils / request-schedulers.js
CommitLineData
f148e5ed
C
1'use strict'
2
3const request = require('supertest')
4
5const requestsStatsUtils = {
6 getRequestsStats
7}
8
9// ---------------------- Export functions --------------------
10
11function getRequestsStats (server, accessToken, callback) {
12 const path = '/api/v1/requests/stats'
13
14 request(server.url)
15 .get(path)
16 .set('Accept', 'application/json')
17 .set('Authorization', 'Bearer ' + accessToken)
18 .expect(200)
19 .expect('Content-Type', /json/)
20 .end(callback)
21}
22
23// ---------------------------------------------------------------------------
24
25module.exports = requestsStatsUtils