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/shared/playlists.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'server/tests/shared/playlists.ts') diff --git a/server/tests/shared/playlists.ts b/server/tests/shared/playlists.ts index fdd541d20..8db303fd8 100644 --- a/server/tests/shared/playlists.ts +++ b/server/tests/shared/playlists.ts @@ -1,17 +1,14 @@ import { expect } from 'chai' import { readdir } from 'fs-extra' -import { join } from 'path' -import { root } from '@shared/core-utils' +import { PeerTubeServer } from '@shared/server-commands' async function checkPlaylistFilesWereRemoved ( playlistUUID: string, - internalServerNumber: number, + server: PeerTubeServer, directories = [ 'thumbnails' ] ) { - const testDirectory = 'test' + internalServerNumber - for (const directory of directories) { - const directoryPath = join(root(), testDirectory, directory) + const directoryPath = server.getDirectoryPath(directory) const files = await readdir(directoryPath) for (const file of files) { -- cgit v1.2.3