mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-12-05 01:10:36 +00:00
Fix tests
This commit is contained in:
@@ -71,18 +71,15 @@ describe('Test transcription in peertube-runner program', function () {
|
||||
it('Should not run transcription on video without audio stream', async function () {
|
||||
this.timeout(360000)
|
||||
|
||||
const now = new Date()
|
||||
|
||||
const uuid = await uploadForTranscription(servers[0], { fixture: 'video_short_no_audio.mp4' })
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
let continueWhile = true
|
||||
while (continueWhile) {
|
||||
await wait(500)
|
||||
|
||||
const { data } = await servers[0].runnerJobs.list({ stateOneOf: [ RunnerJobState.ERRORED ] })
|
||||
|
||||
continueWhile = !data.some(j => j.type === 'video-transcription')
|
||||
}
|
||||
const { data } = await servers[0].runnerJobs.list({ stateOneOf: [ RunnerJobState.ERRORED ] })
|
||||
const job = data.some(j => j.type === 'video-transcription' && new Date(j.createdAt) >= now)
|
||||
expect(job).to.be.false
|
||||
|
||||
await checkNoCaption(servers, uuid)
|
||||
await checkLanguage(servers, uuid, null)
|
||||
|
||||
Reference in New Issue
Block a user