aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/shared/directories.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-03 15:17:11 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commit6a4905602636afd6650c9e6f4d0fcc2105d91100 (patch)
tree1a6ffa4239f62bffa2e6e328ea61a52a65d58d35 /server/tests/shared/directories.ts
parent3a0c2a77b1a6626699514ddaf8135f4397175443 (diff)
downloadPeerTube-6a4905602636afd6650c9e6f4d0fcc2105d91100.tar.gz
PeerTube-6a4905602636afd6650c9e6f4d0fcc2105d91100.tar.zst
PeerTube-6a4905602636afd6650c9e6f4d0fcc2105d91100.zip
Add TMP persistent directory
To store files that must be preserved between peertube restarts
Diffstat (limited to 'server/tests/shared/directories.ts')
-rw-r--r--server/tests/shared/directories.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/tests/shared/directories.ts b/server/tests/shared/directories.ts
index 90d534a06..a614cef7c 100644
--- a/server/tests/shared/directories.ts
+++ b/server/tests/shared/directories.ts
@@ -12,6 +12,10 @@ async function checkTmpIsEmpty (server: PeerTubeServer) {
12 } 12 }
13} 13}
14 14
15async function checkPersistentTmpIsEmpty (server: PeerTubeServer) {
16 await checkDirectoryIsEmpty(server, 'tmp-persistent')
17}
18
15async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: string, exceptions: string[] = []) { 19async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: string, exceptions: string[] = []) {
16 const directoryPath = server.getDirectoryPath(directory) 20 const directoryPath = server.getDirectoryPath(directory)
17 21
@@ -26,5 +30,6 @@ async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: string,
26 30
27export { 31export {
28 checkTmpIsEmpty, 32 checkTmpIsEmpty,
33 checkPersistentTmpIsEmpty,
29 checkDirectoryIsEmpty 34 checkDirectoryIsEmpty
30} 35}