diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-08 17:10:57 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-08 17:11:32 +0200 |
commit | 096641566f2663076c3b0d5a1947ecb7efb29fc0 (patch) | |
tree | 44ab2dc5848966d3597269ed565d4cc9ba2fc6f2 /server/tests/utils | |
parent | e95561cdf195d2926e1856ed285c2b86960bc86f (diff) | |
download | PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.tar.gz PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.tar.zst PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.zip |
Convert real world script to typescript
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/request-schedulers.ts | 8 |
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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | 2 | ||
3 | function getRequestsStats (server: { url: string }, accessToken: string) { | 3 | import { ServerInfo } from '../utils' |
4 | const path = '/api/v1/requests/stats' | 4 | |
5 | function 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 | } |