diff options
Diffstat (limited to 'server/tests/shared/directories.ts')
-rw-r--r-- | server/tests/shared/directories.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/shared/directories.ts b/server/tests/shared/directories.ts index 4f4282554..22578bc0e 100644 --- a/server/tests/shared/directories.ts +++ b/server/tests/shared/directories.ts | |||
@@ -5,6 +5,7 @@ import { pathExists, readdir } from 'fs-extra' | |||
5 | import { homedir } from 'os' | 5 | import { homedir } from 'os' |
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | import { PeerTubeServer } from '@shared/server-commands' | 7 | import { PeerTubeServer } from '@shared/server-commands' |
8 | import { PeerTubeRunnerProcess } from './peertube-runner-process' | ||
8 | 9 | ||
9 | export async function checkTmpIsEmpty (server: PeerTubeServer) { | 10 | export async function checkTmpIsEmpty (server: PeerTubeServer) { |
10 | await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ]) | 11 | await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ]) |
@@ -30,8 +31,8 @@ export async function checkDirectoryIsEmpty (server: PeerTubeServer, directory: | |||
30 | expect(filtered).to.have.lengthOf(0) | 31 | expect(filtered).to.have.lengthOf(0) |
31 | } | 32 | } |
32 | 33 | ||
33 | export async function checkPeerTubeRunnerCacheIsEmpty () { | 34 | export async function checkPeerTubeRunnerCacheIsEmpty (runner: PeerTubeRunnerProcess) { |
34 | const directoryPath = join(homedir(), '.cache', 'peertube-runner-nodejs', 'test', 'transcoding') | 35 | const directoryPath = join(homedir(), '.cache', 'peertube-runner-nodejs', runner.getId(), 'transcoding') |
35 | 36 | ||
36 | const directoryExists = await pathExists(directoryPath) | 37 | const directoryExists = await pathExists(directoryPath) |
37 | expect(directoryExists).to.be.true | 38 | expect(directoryExists).to.be.true |