aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/jobs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/server/jobs.ts')
-rw-r--r--shared/extra-utils/server/jobs.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
index d984b3d1e..cac00e9ab 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/extra-utils/server/jobs.ts
@@ -3,6 +3,7 @@ import { Job, JobState, JobType } from '../../models'
3import { wait } from '../miscs/miscs' 3import { wait } from '../miscs/miscs'
4import { ServerInfo } from './servers' 4import { ServerInfo } from './servers'
5import { makeGetRequest } from '../../../shared/extra-utils' 5import { makeGetRequest } from '../../../shared/extra-utils'
6import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
6 7
7function getJobsList (url: string, accessToken: string, state: JobState) { 8function getJobsList (url: string, accessToken: string, state: JobState) {
8 const path = '/api/v1/jobs/' + state 9 const path = '/api/v1/jobs/' + state
@@ -11,7 +12,7 @@ function getJobsList (url: string, accessToken: string, state: JobState) {
11 .get(path) 12 .get(path)
12 .set('Accept', 'application/json') 13 .set('Accept', 'application/json')
13 .set('Authorization', 'Bearer ' + accessToken) 14 .set('Authorization', 'Bearer ' + accessToken)
14 .expect(200) 15 .expect(HttpStatusCode.OK_200)
15 .expect('Content-Type', /json/) 16 .expect('Content-Type', /json/)
16} 17}
17 18
@@ -38,7 +39,7 @@ function getJobsListPaginationAndSort (options: {
38 url, 39 url,
39 path, 40 path,
40 token: accessToken, 41 token: accessToken,
41 statusCodeExpected: 200, 42 statusCodeExpected: HttpStatusCode.OK_200,
42 query 43 query
43 }) 44 })
44} 45}