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/shared | |
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/shared')
-rw-r--r-- | server/tests/shared/live.ts | 6 | ||||
-rw-r--r-- | server/tests/shared/mock-servers/mock-object-storage.ts | 2 |
2 files changed, 4 insertions, 4 deletions
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: { | |||
50 | }) | 50 | }) |
51 | 51 | ||
52 | if (objectStorage) { | 52 | if (objectStorage) { |
53 | expect(hlsPlaylist.playlistUrl).to.contain(ObjectStorageCommand.getPlaylistBaseUrl()) | 53 | expect(hlsPlaylist.playlistUrl).to.contain(ObjectStorageCommand.getMockPlaylistBaseUrl()) |
54 | } | 54 | } |
55 | 55 | ||
56 | for (let i = 0; i < resolutions.length; i++) { | 56 | for (let i = 0; i < resolutions.length; i++) { |
@@ -65,11 +65,11 @@ async function testVideoResolutions (options: { | |||
65 | }) | 65 | }) |
66 | 66 | ||
67 | const baseUrl = objectStorage | 67 | const baseUrl = objectStorage |
68 | ? ObjectStorageCommand.getPlaylistBaseUrl() + 'hls' | 68 | ? ObjectStorageCommand.getMockPlaylistBaseUrl() + 'hls' |
69 | : originServer.url + '/static/streaming-playlists/hls' | 69 | : originServer.url + '/static/streaming-playlists/hls' |
70 | 70 | ||
71 | if (objectStorage) { | 71 | if (objectStorage) { |
72 | expect(hlsPlaylist.segmentsSha256Url).to.contain(ObjectStorageCommand.getPlaylistBaseUrl()) | 72 | expect(hlsPlaylist.segmentsSha256Url).to.contain(ObjectStorageCommand.getMockPlaylistBaseUrl()) |
73 | } | 73 | } |
74 | 74 | ||
75 | const subPlaylist = await originServer.streamingPlaylists.get({ | 75 | 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 { | |||
12 | const app = express() | 12 | const app = express() |
13 | 13 | ||
14 | app.get('/:bucketName/:path(*)', (req: express.Request, res: express.Response, next: express.NextFunction) => { | 14 | app.get('/:bucketName/:path(*)', (req: express.Request, res: express.Response, next: express.NextFunction) => { |
15 | const url = `http://${req.params.bucketName}.${ObjectStorageCommand.getEndpointHost()}/${req.params.path}` | 15 | const url = `http://${req.params.bucketName}.${ObjectStorageCommand.getMockEndpointHost()}/${req.params.path}` |
16 | 16 | ||
17 | if (process.env.DEBUG) { | 17 | if (process.env.DEBUG) { |
18 | console.log('Receiving request on mocked server %s.', req.url) | 18 | console.log('Receiving request on mocked server %s.', req.url) |