From 6c5f0d3aebbd9debcd33a9aab306b130547852a5 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Tue, 4 Oct 2022 10:53:00 +0200 Subject: server: serve files from storage/well-known (#5214) * server: serve files from storage/well-known closes #5206 * well-known: add tests * test: try to skip new tests * test: another try * fix(config/prod): well_known path * test: fix broken tests * Update misc-endpoints.ts * Use getDirectoryPath for tests * Fix tests Co-authored-by: Chocobozzz --- server/tests/api/redundancy/redundancy.ts | 8 ++++---- server/tests/api/users/users-multiple-servers.ts | 2 +- server/tests/api/videos/video-playlists.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'server/tests/api') diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index 5abed358f..0f4973184 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts @@ -159,8 +159,8 @@ async function check2Webseeds (videoUUID?: string) { const { webtorrentFilenames } = await ensureSameFilenames(videoUUID) const directories = [ - 'test' + servers[0].internalServerNumber + '/redundancy', - 'test' + servers[1].internalServerNumber + '/videos' + servers[0].getDirectoryPath('redundancy'), + servers[1].getDirectoryPath('videos') ] for (const directory of directories) { @@ -214,8 +214,8 @@ async function check1PlaylistRedundancies (videoUUID?: string) { const { hlsFilenames } = await ensureSameFilenames(videoUUID) const directories = [ - 'test' + servers[0].internalServerNumber + '/redundancy/hls', - 'test' + servers[1].internalServerNumber + '/streaming-playlists/hls' + servers[0].getDirectoryPath('redundancy/hls'), + servers[1].getDirectoryPath('streaming-playlists/hls') ] for (const directory of directories) { diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index 62d668d1e..188e6f137 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts @@ -197,7 +197,7 @@ describe('Test users with multiple servers', function () { it('Should not have actor files', async () => { for (const server of servers) { for (const userAvatarFilename of userAvatarFilenames) { - await checkActorFilesWereRemoved(userAvatarFilename, server.internalServerNumber) + await checkActorFilesWereRemoved(userAvatarFilename, server) } } }) diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index a0c743170..9d223de48 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts @@ -1049,7 +1049,7 @@ describe('Test video playlists', function () { this.timeout(30000) for (const server of servers) { - await checkPlaylistFilesWereRemoved(playlistServer1UUID, server.internalServerNumber) + await checkPlaylistFilesWereRemoved(playlistServer1UUID, server) } }) -- cgit v1.2.3