]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-create-transcoding.ts
Add ability to filter my imports by target URL
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-create-transcoding.ts
index bae06ac6cd0e7f64e0973639b32891abe97ee72e..62a6bab0d6c288c03c2a56b2dde3523878796dde 100644 (file)
@@ -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 () {