]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/cli/optimize-old-videos.ts
Fix config test
[github/Chocobozzz/PeerTube.git] / server / tests / cli / optimize-old-videos.ts
index 420fb8049073b93d75200aaba13caa63107acef0..91a1c9cc4a789d6baed08776e7a273438657eeaf 100644 (file)
@@ -4,6 +4,7 @@ import 'mocha'
 import * as chai from 'chai'
 import { join } from 'path'
 import {
+  buildServerDirectory,
   cleanupTests,
   doubleFollow,
   execCLI,
@@ -12,7 +13,6 @@ import {
   getEnvCli,
   getVideo,
   getVideosList,
-  root,
   ServerInfo,
   setAccessTokensToServers,
   uploadVideo,
@@ -100,7 +100,7 @@ describe('Test optimize old videos', function () {
 
         expect(file.size).to.be.below(8000000)
 
-        const path = join(root(), 'test' + servers[0].internalServerNumber, 'videos', video.uuid + '-' + file.resolution.id + '.mp4')
+        const path = buildServerDirectory(servers[0], join('videos', video.uuid + '-' + file.resolution.id + '.mp4'))
         const bitrate = await getVideoFileBitrate(path)
         const fps = await getVideoFileFPS(path)
         const resolution = await getVideoFileResolution(path)