mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Use private ACL for private videos in s3
This commit is contained in:
parent
3545e72c68
commit
9ab330b90d
46 changed files with 1753 additions and 845 deletions
|
@ -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, VideoFile } from '@shared/models'
|
||||
import {
|
||||
cleanupTests,
|
||||
|
@ -18,8 +18,8 @@ import { checkResolutionsInMasterPlaylist, expectStartWith } from '../shared'
|
|||
async function checkFilesInObjectStorage (files: VideoFile[], type: 'webtorrent' | 'playlist') {
|
||||
for (const file of files) {
|
||||
const shouldStartWith = type === 'webtorrent'
|
||||
? ObjectStorageCommand.getWebTorrentBaseUrl()
|
||||
: ObjectStorageCommand.getPlaylistBaseUrl()
|
||||
? ObjectStorageCommand.getMockWebTorrentBaseUrl()
|
||||
: ObjectStorageCommand.getMockPlaylistBaseUrl()
|
||||
|
||||
expectStartWith(file.fileUrl, shouldStartWith)
|
||||
|
||||
|
@ -36,7 +36,7 @@ function runTests (objectStorage: boolean) {
|
|||
this.timeout(120000)
|
||||
|
||||
const config = objectStorage
|
||||
? ObjectStorageCommand.getDefaultConfig()
|
||||
? ObjectStorageCommand.getDefaultMockConfig()
|
||||
: {}
|
||||
|
||||
// Run server 2 to have transcoding enabled
|
||||
|
@ -47,7 +47,7 @@ function runTests (objectStorage: boolean) {
|
|||
|
||||
await doubleFollow(servers[0], servers[1])
|
||||
|
||||
if (objectStorage) await ObjectStorageCommand.prepareDefaultBuckets()
|
||||
if (objectStorage) await ObjectStorageCommand.prepareDefaultMockBuckets()
|
||||
|
||||
for (let i = 1; i <= 5; i++) {
|
||||
const { uuid, shortUUID } = await servers[0].videos.upload({ attributes: { name: 'video' + i } })
|
||||
|
@ -255,7 +255,7 @@ describe('Test create transcoding jobs', function () {
|
|||
})
|
||||
|
||||
describe('On object storage', function () {
|
||||
if (areObjectStorageTestsDisabled()) return
|
||||
if (areMockObjectStorageTestsDisabled()) return
|
||||
|
||||
runTests(true)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue