diff options
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 | } |