aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/create-transcoding-job.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:06:10 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 11:06:10 +0200
commitc186a67f90203af6bfa434f026efdc99193bcd65 (patch)
tree54e715f1afba3aaa14d6448fdbc14d699b7ae775 /server/tests/cli/create-transcoding-job.ts
parent66a7fc947321b923fa1e7182202e03d0e21ffb3e (diff)
downloadPeerTube-c186a67f90203af6bfa434f026efdc99193bcd65.tar.gz
PeerTube-c186a67f90203af6bfa434f026efdc99193bcd65.tar.zst
PeerTube-c186a67f90203af6bfa434f026efdc99193bcd65.zip
Support short uuid for scripts
Diffstat (limited to 'server/tests/cli/create-transcoding-job.ts')
-rw-r--r--server/tests/cli/create-transcoding-job.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index 3313a492f..3fd624091 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -52,8 +52,13 @@ function runTests (objectStorage: boolean) {
52 if (objectStorage) await ObjectStorageCommand.prepareDefaultBuckets() 52 if (objectStorage) await ObjectStorageCommand.prepareDefaultBuckets()
53 53
54 for (let i = 1; i <= 5; i++) { 54 for (let i = 1; i <= 5; i++) {
55 const { uuid } = await servers[0].videos.upload({ attributes: { name: 'video' + i } }) 55 const { uuid, shortUUID } = await servers[0].videos.upload({ attributes: { name: 'video' + i } })
56 videosUUID.push(uuid) 56
57 if (i > 2) {
58 videosUUID.push(uuid)
59 } else {
60 videosUUID.push(shortUUID)
61 }
57 } 62 }
58 63
59 await waitJobs(servers) 64 await waitJobs(servers)
@@ -88,7 +93,7 @@ function runTests (objectStorage: boolean) {
88 for (const video of data) { 93 for (const video of data) {
89 const videoDetails = await server.videos.get({ id: video.uuid }) 94 const videoDetails = await server.videos.get({ id: video.uuid })
90 95
91 if (video.uuid === videosUUID[1]) { 96 if (video.shortUUID === videosUUID[1] || video.uuid === videosUUID[1]) {
92 expect(videoDetails.files).to.have.lengthOf(4) 97 expect(videoDetails.files).to.have.lengthOf(4)
93 expect(videoDetails.streamingPlaylists).to.have.lengthOf(0) 98 expect(videoDetails.streamingPlaylists).to.have.lengthOf(0)
94 99