X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fcli%2Foptimize-old-videos.ts;h=e369a33058a909d3d52a8611b2ec120d4083876d;hb=d0a0fa429d4651710ed951a3c11af0219e408964;hp=91a1c9cc4a789d6baed08776e7a273438657eeaf;hpb=ca5c612bfdd225433bcc6ace01c8024df3f674ba;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/cli/optimize-old-videos.ts b/server/tests/cli/optimize-old-videos.ts index 91a1c9cc4..e369a3305 100644 --- a/server/tests/cli/optimize-old-videos.ts +++ b/server/tests/cli/optimize-old-videos.ts @@ -4,13 +4,10 @@ import 'mocha' import * as chai from 'chai' import { join } from 'path' import { - buildServerDirectory, cleanupTests, doubleFollow, - execCLI, flushAndRunMultipleServers, generateHighBitrateVideo, - getEnvCli, getVideo, getVideosList, ServerInfo, @@ -73,9 +70,7 @@ describe('Test optimize old videos', function () { it('Should run optimize script', async function () { this.timeout(200000) - const env = getEnvCli(servers[0]) - await execCLI(`${env} npm run optimize-old-videos`) - + await servers[0].cliCommand.execWithEnv('npm run optimize-old-videos') await waitJobs(servers) for (const server of servers) { @@ -100,7 +95,7 @@ describe('Test optimize old videos', function () { expect(file.size).to.be.below(8000000) - const path = buildServerDirectory(servers[0], join('videos', video.uuid + '-' + file.resolution.id + '.mp4')) + const path = servers[0].serversCommand.buildDirectory(join('videos', video.uuid + '-' + file.resolution.id + '.mp4')) const bitrate = await getVideoFileBitrate(path) const fps = await getVideoFileFPS(path) const resolution = await getVideoFileResolution(path)