From 329619b3453479f76c049816b7403b86e9d45cb5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 5 Jul 2021 16:37:50 +0200 Subject: Introduce CLI command --- server/tests/cli/create-import-video-file-job.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'server/tests/cli/create-import-video-file-job.ts') diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts index 49758ff56..8a23a94de 100644 --- a/server/tests/cli/create-import-video-file-job.ts +++ b/server/tests/cli/create-import-video-file-job.ts @@ -6,9 +6,7 @@ import { VideoFile } from '@shared/models/videos/video-file.model' import { cleanupTests, doubleFollow, - execCLI, flushAndRunMultipleServers, - getEnvCli, getVideo, getVideosList, ServerInfo, @@ -57,8 +55,8 @@ describe('Test create import video jobs', function () { }) it('Should run a import job on video 1 with a lower resolution', async function () { - const env = getEnvCli(servers[0]) - await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm`) + const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm` + await servers[0].cliCommand.execWithEnv(command) await waitJobs(servers) @@ -77,8 +75,8 @@ describe('Test create import video jobs', function () { }) it('Should run a import job on video 2 with the same resolution and a different extension', async function () { - const env = getEnvCli(servers[1]) - await execCLI(`${env} npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv`) + const command = `npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv` + await servers[1].cliCommand.execWithEnv(command) await waitJobs(servers) @@ -99,8 +97,8 @@ describe('Test create import video jobs', function () { }) it('Should run a import job on video 2 with the same resolution and the same extension', async function () { - const env = getEnvCli(servers[0]) - await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm`) + const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm` + await servers[0].cliCommand.execWithEnv(command) await waitJobs(servers) -- cgit v1.2.3