import * as chai from 'chai'
import 'mocha'
+import { JobState } from '../../../../shared/models'
import { VideoPrivacy } from '../../../../shared/models/videos'
import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
import { completeVideoCheck, getVideo, immutableAssign, reRunServer, viewVideo } from '../../utils'
nsfw: true,
privacy: VideoPrivacy.PUBLIC,
description: 'my super description for server 1',
+ support: 'my super support text for server 1',
tags: [ 'tag1p1', 'tag2p1' ],
fixture: 'video_short1.webm'
}
language: 9,
nsfw: true,
description: 'my super description for server 1',
+ support: 'my super support text for server 1',
host: 'localhost:9001',
account: 'root',
isLocal: false,
})
before(async function () {
- this.timeout(20000)
+ this.timeout(30000)
servers = await flushAndRunMultipleServers(2)
})
it('Should not have pending/processing jobs anymore', async function () {
- const res = await getJobsListPaginationAndSort(servers[0].url, servers[0].accessToken, 0, 50, '-createdAt')
- const jobs = res.body.data
+ const states: JobState[] = [ 'inactive', 'active' ]
- for (const job of jobs) {
- expect(job.state).not.to.equal('pending')
- expect(job.state).not.to.equal('processing')
+ for (const state of states) {
+ const res = await getJobsListPaginationAndSort(servers[ 0 ].url, servers[ 0 ].accessToken, state,0, 50, '-createdAt')
+ expect(res.body.data).to.have.length(0)
}
})