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/directories.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'server/tests/shared/directories.ts') diff --git a/server/tests/shared/directories.ts b/server/tests/shared/directories.ts index c7065a767..90d534a06 100644 --- a/server/tests/shared/directories.ts +++ b/server/tests/shared/directories.ts @@ -2,22 +2,18 @@ import { expect } from 'chai' import { pathExists, readdir } from 'fs-extra' -import { join } from 'path' -import { root } from '@shared/core-utils' import { PeerTubeServer } from '@shared/server-commands' async function checkTmpIsEmpty (server: PeerTubeServer) { await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ]) - if (await pathExists(join('test' + server.internalServerNumber, 'tmp', 'hls'))) { + if (await pathExists(server.getDirectoryPath('tmp/hls'))) { await checkDirectoryIsEmpty(server, 'tmp/hls') } } async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: string, exceptions: string[] = []) { - const testDirectory = 'test' + server.internalServerNumber - - const directoryPath = join(root(), testDirectory, directory) + const directoryPath = server.getDirectoryPath(directory) const directoryExists = await pathExists(directoryPath) expect(directoryExists).to.be.true -- cgit v1.2.3