X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-create-transcoding.ts;h=62a6bab0d6c288c03c2a56b2dde3523878796dde;hb=d511df28906f84c7d25ecb24e41515ed549ff276;hp=bae06ac6cd0e7f64e0973639b32891abe97ee72e;hpb=ad5db1044c8599eaaaa2a578b350777ae996b068;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-create-transcoding.ts b/server/tests/api/videos/video-create-transcoding.ts index bae06ac6c..62a6bab0d 100644 --- a/server/tests/api/videos/video-create-transcoding.ts +++ b/server/tests/api/videos/video-create-transcoding.ts @@ -2,19 +2,20 @@ import 'mocha' import * as chai from 'chai' +import { expectStartWith } from '@server/tests/shared' +import { areObjectStorageTestsDisabled } from '@shared/core-utils' +import { HttpStatusCode, VideoDetails } from '@shared/models' import { - areObjectStorageTestsDisabled, cleanupTests, createMultipleServers, doubleFollow, - expectStartWith, + expectNoFailedTranscodingJob, makeRawRequest, ObjectStorageCommand, PeerTubeServer, setAccessTokensToServers, waitJobs -} from '@shared/extra-utils' -import { HttpStatusCode, VideoDetails } from '@shared/models' +} from '@shared/server-commands' const expect = chai.expect @@ -30,11 +31,6 @@ async function checkFilesInObjectStorage (video: VideoDetails) { } } -async function expectNoFailedTranscodingJob (server: PeerTubeServer) { - const { data } = await server.jobs.listFailed({ jobType: 'video-transcoding' }) - expect(data).to.have.lengthOf(0) -} - function runTests (objectStorage: boolean) { let servers: PeerTubeServer[] = [] let videoUUID: string @@ -60,12 +56,12 @@ function runTests (objectStorage: boolean) { const { shortUUID } = await servers[0].videos.quickUpload({ name: 'video' }) videoUUID = shortUUID + await waitJobs(servers) + const video = await servers[0].videos.get({ id: videoUUID }) publishedAt = video.publishedAt as string await servers[0].config.enableTranscoding() - - await waitJobs(servers) }) it('Should generate HLS', async function () {