diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-19 10:43:53 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-10-24 14:48:24 +0200 |
commit | 9ab330b90decf4edf152ff8e1d2948c065766b2c (patch) | |
tree | 29d924f50f7307e8e828a57ecb9ea78623487ce0 /server/tests/cli/create-import-video-file-job.ts | |
parent | 3545e72c686ff1725bbdfd8d16d693e2f4aa75a3 (diff) | |
download | PeerTube-9ab330b90decf4edf152ff8e1d2948c065766b2c.tar.gz PeerTube-9ab330b90decf4edf152ff8e1d2948c065766b2c.tar.zst PeerTube-9ab330b90decf4edf152ff8e1d2948c065766b2c.zip |
Use private ACL for private videos in s3
Diffstat (limited to 'server/tests/cli/create-import-video-file-job.ts')
-rw-r--r-- | server/tests/cli/create-import-video-file-job.ts | 10 |
1 files changed, 5 insertions, 5 deletions
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 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { areObjectStorageTestsDisabled } from '@shared/core-utils' | 4 | import { areMockObjectStorageTestsDisabled } from '@shared/core-utils' |
5 | import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models' | 5 | import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models' |
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
@@ -27,7 +27,7 @@ function assertVideoProperties (video: VideoFile, resolution: number, extname: s | |||
27 | 27 | ||
28 | async function checkFiles (video: VideoDetails, objectStorage: boolean) { | 28 | async function checkFiles (video: VideoDetails, objectStorage: boolean) { |
29 | for (const file of video.files) { | 29 | for (const file of video.files) { |
30 | if (objectStorage) expectStartWith(file.fileUrl, ObjectStorageCommand.getWebTorrentBaseUrl()) | 30 | if (objectStorage) expectStartWith(file.fileUrl, ObjectStorageCommand.getMockWebTorrentBaseUrl()) |
31 | 31 | ||
32 | await makeRawRequest({ url: file.fileUrl, expectedStatus: HttpStatusCode.OK_200 }) | 32 | await makeRawRequest({ url: file.fileUrl, expectedStatus: HttpStatusCode.OK_200 }) |
33 | } | 33 | } |
@@ -43,7 +43,7 @@ function runTests (objectStorage: boolean) { | |||
43 | this.timeout(90000) | 43 | this.timeout(90000) |
44 | 44 | ||
45 | const config = objectStorage | 45 | const config = objectStorage |
46 | ? ObjectStorageCommand.getDefaultConfig() | 46 | ? ObjectStorageCommand.getDefaultMockConfig() |
47 | : {} | 47 | : {} |
48 | 48 | ||
49 | // Run server 2 to have transcoding enabled | 49 | // Run server 2 to have transcoding enabled |
@@ -52,7 +52,7 @@ function runTests (objectStorage: boolean) { | |||
52 | 52 | ||
53 | await doubleFollow(servers[0], servers[1]) | 53 | await doubleFollow(servers[0], servers[1]) |
54 | 54 | ||
55 | if (objectStorage) await ObjectStorageCommand.prepareDefaultBuckets() | 55 | if (objectStorage) await ObjectStorageCommand.prepareDefaultMockBuckets() |
56 | 56 | ||
57 | // Upload two videos for our needs | 57 | // Upload two videos for our needs |
58 | { | 58 | { |
@@ -157,7 +157,7 @@ describe('Test create import video jobs', function () { | |||
157 | }) | 157 | }) |
158 | 158 | ||
159 | describe('On object storage', function () { | 159 | describe('On object storage', function () { |
160 | if (areObjectStorageTestsDisabled()) return | 160 | if (areMockObjectStorageTestsDisabled()) return |
161 | 161 | ||
162 | runTests(true) | 162 | runTests(true) |
163 | }) | 163 | }) |