diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:04:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 89d241a79c262b9775c233b73cff080043ebb5e6 (patch) | |
tree | cb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/cli/create-import-video-file-job.ts | |
parent | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff) | |
download | PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip |
Shorter server command names
Diffstat (limited to 'server/tests/cli/create-import-video-file-job.ts')
-rw-r--r-- | server/tests/cli/create-import-video-file-job.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts index b1d9da242..26f4bdc8d 100644 --- a/server/tests/cli/create-import-video-file-job.ts +++ b/server/tests/cli/create-import-video-file-job.ts | |||
@@ -35,12 +35,12 @@ describe('Test create import video jobs', function () { | |||
35 | 35 | ||
36 | // Upload two videos for our needs | 36 | // Upload two videos for our needs |
37 | { | 37 | { |
38 | const { uuid } = await servers[0].videosCommand.upload({ attributes: { name: 'video1' } }) | 38 | const { uuid } = await servers[0].videos.upload({ attributes: { name: 'video1' } }) |
39 | video1UUID = uuid | 39 | video1UUID = uuid |
40 | } | 40 | } |
41 | 41 | ||
42 | { | 42 | { |
43 | const { uuid } = await servers[1].videosCommand.upload({ attributes: { name: 'video2' } }) | 43 | const { uuid } = await servers[1].videos.upload({ attributes: { name: 'video2' } }) |
44 | video2UUID = uuid | 44 | video2UUID = uuid |
45 | } | 45 | } |
46 | 46 | ||
@@ -50,16 +50,16 @@ describe('Test create import video jobs', function () { | |||
50 | 50 | ||
51 | it('Should run a import job on video 1 with a lower resolution', async function () { | 51 | it('Should run a import job on video 1 with a lower resolution', async function () { |
52 | const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm` | 52 | const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short-480.webm` |
53 | await servers[0].cliCommand.execWithEnv(command) | 53 | await servers[0].cli.execWithEnv(command) |
54 | 54 | ||
55 | await waitJobs(servers) | 55 | await waitJobs(servers) |
56 | 56 | ||
57 | for (const server of servers) { | 57 | for (const server of servers) { |
58 | const { data: videos } = await server.videosCommand.list() | 58 | const { data: videos } = await server.videos.list() |
59 | expect(videos).to.have.lengthOf(2) | 59 | expect(videos).to.have.lengthOf(2) |
60 | 60 | ||
61 | const video = videos.find(({ uuid }) => uuid === video1UUID) | 61 | const video = videos.find(({ uuid }) => uuid === video1UUID) |
62 | const videoDetails = await server.videosCommand.get({ id: video.uuid }) | 62 | const videoDetails = await server.videos.get({ id: video.uuid }) |
63 | 63 | ||
64 | expect(videoDetails.files).to.have.lengthOf(2) | 64 | expect(videoDetails.files).to.have.lengthOf(2) |
65 | const [ originalVideo, transcodedVideo ] = videoDetails.files | 65 | const [ originalVideo, transcodedVideo ] = videoDetails.files |
@@ -70,16 +70,16 @@ describe('Test create import video jobs', function () { | |||
70 | 70 | ||
71 | it('Should run a import job on video 2 with the same resolution and a different extension', async function () { | 71 | it('Should run a import job on video 2 with the same resolution and a different extension', async function () { |
72 | const command = `npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv` | 72 | const command = `npm run create-import-video-file-job -- -v ${video2UUID} -i server/tests/fixtures/video_short.ogv` |
73 | await servers[1].cliCommand.execWithEnv(command) | 73 | await servers[1].cli.execWithEnv(command) |
74 | 74 | ||
75 | await waitJobs(servers) | 75 | await waitJobs(servers) |
76 | 76 | ||
77 | for (const server of servers) { | 77 | for (const server of servers) { |
78 | const { data: videos } = await server.videosCommand.list() | 78 | const { data: videos } = await server.videos.list() |
79 | expect(videos).to.have.lengthOf(2) | 79 | expect(videos).to.have.lengthOf(2) |
80 | 80 | ||
81 | const video = videos.find(({ uuid }) => uuid === video2UUID) | 81 | const video = videos.find(({ uuid }) => uuid === video2UUID) |
82 | const videoDetails = await server.videosCommand.get({ id: video.uuid }) | 82 | const videoDetails = await server.videos.get({ id: video.uuid }) |
83 | 83 | ||
84 | expect(videoDetails.files).to.have.lengthOf(4) | 84 | expect(videoDetails.files).to.have.lengthOf(4) |
85 | const [ originalVideo, transcodedVideo420, transcodedVideo320, transcodedVideo240 ] = videoDetails.files | 85 | const [ originalVideo, transcodedVideo420, transcodedVideo320, transcodedVideo240 ] = videoDetails.files |
@@ -92,16 +92,16 @@ describe('Test create import video jobs', function () { | |||
92 | 92 | ||
93 | it('Should run a import job on video 2 with the same resolution and the same extension', async function () { | 93 | it('Should run a import job on video 2 with the same resolution and the same extension', async function () { |
94 | const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm` | 94 | const command = `npm run create-import-video-file-job -- -v ${video1UUID} -i server/tests/fixtures/video_short2.webm` |
95 | await servers[0].cliCommand.execWithEnv(command) | 95 | await servers[0].cli.execWithEnv(command) |
96 | 96 | ||
97 | await waitJobs(servers) | 97 | await waitJobs(servers) |
98 | 98 | ||
99 | for (const server of servers) { | 99 | for (const server of servers) { |
100 | const { data: videos } = await server.videosCommand.list() | 100 | const { data: videos } = await server.videos.list() |
101 | expect(videos).to.have.lengthOf(2) | 101 | expect(videos).to.have.lengthOf(2) |
102 | 102 | ||
103 | const video = videos.find(({ uuid }) => uuid === video1UUID) | 103 | const video = videos.find(({ uuid }) => uuid === video1UUID) |
104 | const videoDetails = await server.videosCommand.get({ id: video.uuid }) | 104 | const videoDetails = await server.videos.get({ id: video.uuid }) |
105 | 105 | ||
106 | expect(videoDetails.files).to.have.lengthOf(2) | 106 | expect(videoDetails.files).to.have.lengthOf(2) |
107 | const [ video720, video480 ] = videoDetails.files | 107 | const [ video720, video480 ] = videoDetails.files |