import * as chai from 'chai'
import { join } from 'path'
import {
- buildServerDirectory,
cleanupTests,
doubleFollow,
- execCLI,
flushAndRunMultipleServers,
generateHighBitrateVideo,
- getEnvCli,
getVideo,
getVideosList,
ServerInfo,
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) {
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)