From 9ab330b90decf4edf152ff8e1d2948c065766b2c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Oct 2022 10:43:53 +0200 Subject: Use private ACL for private videos in s3 --- server/tests/shared/live.ts | 6 +++--- server/tests/shared/mock-servers/mock-object-storage.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/tests/shared') diff --git a/server/tests/shared/live.ts b/server/tests/shared/live.ts index da3691711..78e29f575 100644 --- a/server/tests/shared/live.ts +++ b/server/tests/shared/live.ts @@ -50,7 +50,7 @@ async function testVideoResolutions (options: { }) if (objectStorage) { - expect(hlsPlaylist.playlistUrl).to.contain(ObjectStorageCommand.getPlaylistBaseUrl()) + expect(hlsPlaylist.playlistUrl).to.contain(ObjectStorageCommand.getMockPlaylistBaseUrl()) } for (let i = 0; i < resolutions.length; i++) { @@ -65,11 +65,11 @@ async function testVideoResolutions (options: { }) const baseUrl = objectStorage - ? ObjectStorageCommand.getPlaylistBaseUrl() + 'hls' + ? ObjectStorageCommand.getMockPlaylistBaseUrl() + 'hls' : originServer.url + '/static/streaming-playlists/hls' if (objectStorage) { - expect(hlsPlaylist.segmentsSha256Url).to.contain(ObjectStorageCommand.getPlaylistBaseUrl()) + expect(hlsPlaylist.segmentsSha256Url).to.contain(ObjectStorageCommand.getMockPlaylistBaseUrl()) } const subPlaylist = await originServer.streamingPlaylists.get({ diff --git a/server/tests/shared/mock-servers/mock-object-storage.ts b/server/tests/shared/mock-servers/mock-object-storage.ts index 99d68e014..8c325bf11 100644 --- a/server/tests/shared/mock-servers/mock-object-storage.ts +++ b/server/tests/shared/mock-servers/mock-object-storage.ts @@ -12,7 +12,7 @@ export class MockObjectStorage { const app = express() app.get('/:bucketName/:path(*)', (req: express.Request, res: express.Response, next: express.NextFunction) => { - const url = `http://${req.params.bucketName}.${ObjectStorageCommand.getEndpointHost()}/${req.params.path}` + const url = `http://${req.params.bucketName}.${ObjectStorageCommand.getMockEndpointHost()}/${req.params.path}` if (process.env.DEBUG) { console.log('Receiving request on mocked server %s.', req.url) -- cgit v1.2.3