aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/request-schedulers.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-08 17:10:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-08 17:11:32 +0200
commit096641566f2663076c3b0d5a1947ecb7efb29fc0 (patch)
tree44ab2dc5848966d3597269ed565d4cc9ba2fc6f2 /server/tests/utils/request-schedulers.ts
parente95561cdf195d2926e1856ed285c2b86960bc86f (diff)
downloadPeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.tar.gz
PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.tar.zst
PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.zip
Convert real world script to typescript
Diffstat (limited to 'server/tests/utils/request-schedulers.ts')
-rw-r--r--server/tests/utils/request-schedulers.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/tests/utils/request-schedulers.ts b/server/tests/utils/request-schedulers.ts
index ae8227b79..f100f6d99 100644
--- a/server/tests/utils/request-schedulers.ts
+++ b/server/tests/utils/request-schedulers.ts
@@ -1,12 +1,14 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2 2
3function getRequestsStats (server: { url: string }, accessToken: string) { 3import { ServerInfo } from '../utils'
4 const path = '/api/v1/requests/stats' 4
5function getRequestsStats (server: ServerInfo) {
6 const path = '/api/v1/request-schedulers/stats'
5 7
6 return request(server.url) 8 return request(server.url)
7 .get(path) 9 .get(path)
8 .set('Accept', 'application/json') 10 .set('Accept', 'application/json')
9 .set('Authorization', 'Bearer ' + accessToken) 11 .set('Authorization', 'Bearer ' + server.accessToken)
10 .expect(200) 12 .expect(200)
11 .expect('Content-Type', /json/) 13 .expect('Content-Type', /json/)
12} 14}