aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/server/handle-down.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/server/handle-down.ts')
-rw-r--r--server/tests/api/server/handle-down.ts10
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
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { JobState } from '../../../../shared/models'
5import { VideoPrivacy } from '../../../../shared/models/videos' 6import { VideoPrivacy } from '../../../../shared/models/videos'
6import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' 7import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
7import { completeVideoCheck, getVideo, immutableAssign, reRunServer, viewVideo } from '../../utils' 8import { 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