aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/create-import-video-file-job.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-05 16:37:50 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:16 +0200
commit329619b3453479f76c049816b7403b86e9d45cb5 (patch)
treee522940946402a4284d356f2cde8e0dcbe29b289 /server/tests/cli/create-import-video-file-job.ts
parenta6a79eae0d8564099b6957e76d7a18528d9ef124 (diff)
downloadPeerTube-329619b3453479f76c049816b7403b86e9d45cb5.tar.gz
PeerTube-329619b3453479f76c049816b7403b86e9d45cb5.tar.zst
PeerTube-329619b3453479f76c049816b7403b86e9d45cb5.zip
Introduce CLI command
Diffstat (limited to 'server/tests/cli/create-import-video-file-job.ts')
-rw-r--r--server/tests/cli/create-import-video-file-job.ts14
1 files changed, 6 insertions, 8 deletions
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'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 doubleFollow, 8 doubleFollow,
9 execCLI,
10 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
11 getEnvCli,
12 getVideo, 10 getVideo,
13 getVideosList, 11 getVideosList,
14 ServerInfo, 12 ServerInfo,
@@ -57,8 +55,8 @@ describe('Test create import video jobs', function () {
57 }) 55 })
58 56
59 it('Should run a import job on video 1 with a lower resolution', async function () { 57 it('Should run a import job on video 1 with a lower resolution', async function () {
60 const env = getEnvCli(servers[0]) 58 const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm`
61 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm`) 59 await servers[0].cliCommand.execWithEnv(command)
62 60
63 await waitJobs(servers) 61 await waitJobs(servers)
64 62
@@ -77,8 +75,8 @@ describe('Test create import video jobs', function () {
77 }) 75 })
78 76
79 it('Should run a import job on video 2 with the same resolution and a different extension', async function () { 77 it('Should run a import job on video 2 with the same resolution and a different extension', async function () {
80 const env = getEnvCli(servers[1]) 78 const command = `npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv`
81 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv`) 79 await servers[1].cliCommand.execWithEnv(command)
82 80
83 await waitJobs(servers) 81 await waitJobs(servers)
84 82
@@ -99,8 +97,8 @@ describe('Test create import video jobs', function () {
99 }) 97 })
100 98
101 it('Should run a import job on video 2 with the same resolution and the same extension', async function () { 99 it('Should run a import job on video 2 with the same resolution and the same extension', async function () {
102 const env = getEnvCli(servers[0]) 100 const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm`
103 await execCLI(`${env} npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm`) 101 await servers[0].cliCommand.execWithEnv(command)
104 102
105 await waitJobs(servers) 103 await waitJobs(servers)
106 104