]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/cli/optimize-old-videos.ts
Introduce CLI command
[github/Chocobozzz/PeerTube.git] / server / tests / cli / optimize-old-videos.ts
index 91a1c9cc4a789d6baed08776e7a273438657eeaf..bd15012fe1ae032552c0e5c5a07fd89c68ba0292 100644 (file)
@@ -7,10 +7,8 @@ import {
   buildServerDirectory,
   cleanupTests,
   doubleFollow,
-  execCLI,
   flushAndRunMultipleServers,
   generateHighBitrateVideo,
-  getEnvCli,
   getVideo,
   getVideosList,
   ServerInfo,
@@ -73,9 +71,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) {