X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fshared%2Factors.ts;h=41fd72e89410dc53d433981141df59e172e6ee15;hb=cfa61763812954f738f2863948f6707f9fd3aad1;hp=f8f4a51370227abf4ca7d5d2c5be5857077fb7cd;hpb=3318147300b4f998adf728eb0a5a14a4c1829c51;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/shared/actors.ts b/server/tests/shared/actors.ts index f8f4a5137..41fd72e89 100644 --- a/server/tests/shared/actors.ts +++ b/server/tests/shared/actors.ts @@ -2,8 +2,6 @@ import { expect } from 'chai' import { pathExists, readdir } from 'fs-extra' -import { join } from 'path' -import { root } from '@shared/core-utils' import { Account, VideoChannel } from '@shared/models' import { PeerTubeServer } from '@shared/server-commands' @@ -31,11 +29,9 @@ async function expectAccountFollows (options: { return expectActorFollow({ ...options, data }) } -async function checkActorFilesWereRemoved (filename: string, serverNumber: number) { - const testDirectory = 'test' + serverNumber - +async function checkActorFilesWereRemoved (filename: string, server: PeerTubeServer) { for (const directory of [ 'avatars' ]) { - const directoryPath = join(root(), testDirectory, directory) + const directoryPath = server.getDirectoryPath(directory) const directoryExists = await pathExists(directoryPath) expect(directoryExists).to.be.true