From 254d3579f5338f5fd775c17d15cdfc37078bcfb4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jul 2021 09:47:51 +0200 Subject: Use an object to represent a server --- shared/extra-utils/server/directories.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shared/extra-utils/server/directories.ts') diff --git a/shared/extra-utils/server/directories.ts b/shared/extra-utils/server/directories.ts index 3cd38a561..b6465cbf4 100644 --- a/shared/extra-utils/server/directories.ts +++ b/shared/extra-utils/server/directories.ts @@ -4,9 +4,9 @@ import { expect } from 'chai' import { pathExists, readdir } from 'fs-extra' import { join } from 'path' import { root } from '@server/helpers/core-utils' -import { ServerInfo } from './servers' +import { PeerTubeServer } from './server' -async function checkTmpIsEmpty (server: ServerInfo) { +async function checkTmpIsEmpty (server: PeerTubeServer) { await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ]) if (await pathExists(join('test' + server.internalServerNumber, 'tmp', 'hls'))) { @@ -14,7 +14,7 @@ async function checkTmpIsEmpty (server: ServerInfo) { } } -async function checkDirectoryIsEmpty (server: ServerInfo, directory: string, exceptions: string[] = []) { +async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: string, exceptions: string[] = []) { const testDirectory = 'test' + server.internalServerNumber const directoryPath = join(root(), testDirectory, directory) -- cgit v1.2.3