aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/directories.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /shared/extra-utils/server/directories.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'shared/extra-utils/server/directories.ts')
-rw-r--r--shared/extra-utils/server/directories.ts6
1 files changed, 3 insertions, 3 deletions
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'
4import { pathExists, readdir } from 'fs-extra' 4import { pathExists, readdir } from 'fs-extra'
5import { join } from 'path' 5import { join } from 'path'
6import { root } from '@server/helpers/core-utils' 6import { root } from '@server/helpers/core-utils'
7import { ServerInfo } from './servers' 7import { PeerTubeServer } from './server'
8 8
9async function checkTmpIsEmpty (server: ServerInfo) { 9async function checkTmpIsEmpty (server: PeerTubeServer) {
10 await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ]) 10 await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ])
11 11
12 if (await pathExists(join('test' + server.internalServerNumber, 'tmp', 'hls'))) { 12 if (await pathExists(join('test' + server.internalServerNumber, 'tmp', 'hls'))) {
@@ -14,7 +14,7 @@ async function checkTmpIsEmpty (server: ServerInfo) {
14 } 14 }
15} 15}
16 16
17async function checkDirectoryIsEmpty (server: ServerInfo, directory: string, exceptions: string[] = []) { 17async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: string, exceptions: string[] = []) {
18 const testDirectory = 'test' + server.internalServerNumber 18 const testDirectory = 'test' + server.internalServerNumber
19 19
20 const directoryPath = join(root(), testDirectory, directory) 20 const directoryPath = join(root(), testDirectory, directory)