X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fcli%2Fcreate-import-video-file-job.ts;h=43f53035b947fe5f23655aa60e736448e41c2b03;hb=9ab330b90decf4edf152ff8e1d2948c065766b2c;hp=a4aa5f69984ebd6a3219d2d88f75ed77da11126e;hpb=3545e72c686ff1725bbdfd8d16d693e2f4aa75a3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts index a4aa5f699..43f53035b 100644 --- a/server/tests/cli/create-import-video-file-job.ts +++ b/server/tests/cli/create-import-video-file-job.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import { expect } from 'chai' -import { areObjectStorageTestsDisabled } from '@shared/core-utils' +import { areMockObjectStorageTestsDisabled } from '@shared/core-utils' import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models' import { cleanupTests, @@ -27,7 +27,7 @@ function assertVideoProperties (video: VideoFile, resolution: number, extname: s async function checkFiles (video: VideoDetails, objectStorage: boolean) { for (const file of video.files) { - if (objectStorage) expectStartWith(file.fileUrl, ObjectStorageCommand.getWebTorrentBaseUrl()) + if (objectStorage) expectStartWith(file.fileUrl, ObjectStorageCommand.getMockWebTorrentBaseUrl()) await makeRawRequest({ url: file.fileUrl, expectedStatus: HttpStatusCode.OK_200 }) } @@ -43,7 +43,7 @@ function runTests (objectStorage: boolean) { this.timeout(90000) const config = objectStorage - ? ObjectStorageCommand.getDefaultConfig() + ? ObjectStorageCommand.getDefaultMockConfig() : {} // Run server 2 to have transcoding enabled @@ -52,7 +52,7 @@ function runTests (objectStorage: boolean) { await doubleFollow(servers[0], servers[1]) - if (objectStorage) await ObjectStorageCommand.prepareDefaultBuckets() + if (objectStorage) await ObjectStorageCommand.prepareDefaultMockBuckets() // Upload two videos for our needs { @@ -157,7 +157,7 @@ describe('Test create import video jobs', function () { }) describe('On object storage', function () { - if (areObjectStorageTestsDisabled()) return + if (areMockObjectStorageTestsDisabled()) return runTests(true) })