diff options
Diffstat (limited to 'server/tests/api/server/handle-down.ts')
-rw-r--r-- | server/tests/api/server/handle-down.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index de4e77b2f..4cedeb89e 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { JobState } from '../../../../shared/models' | ||
5 | import { VideoPrivacy } from '../../../../shared/models/videos' | 6 | import { VideoPrivacy } from '../../../../shared/models/videos' |
6 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 7 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' |
7 | import { completeVideoCheck, getVideo, immutableAssign, reRunServer, viewVideo } from '../../utils' | 8 | import { completeVideoCheck, getVideo, immutableAssign, reRunServer, viewVideo } from '../../utils' |
@@ -139,12 +140,11 @@ describe('Test handle downs', function () { | |||
139 | }) | 140 | }) |
140 | 141 | ||
141 | it('Should not have pending/processing jobs anymore', async function () { | 142 | it('Should not have pending/processing jobs anymore', async function () { |
142 | const res = await getJobsListPaginationAndSort(servers[0].url, servers[0].accessToken, 0, 50, '-createdAt') | 143 | const states: JobState[] = [ 'inactive', 'active' ] |
143 | const jobs = res.body.data | ||
144 | 144 | ||
145 | for (const job of jobs) { | 145 | for (const state of states) { |
146 | expect(job.state).not.to.equal('pending') | 146 | const res = await getJobsListPaginationAndSort(servers[ 0 ].url, servers[ 0 ].accessToken, state,0, 50, '-createdAt') |
147 | expect(job.state).not.to.equal('processing') | 147 | expect(res.body.data).to.have.length(0) |
148 | } | 148 | } |
149 | }) | 149 | }) |
150 | 150 | ||