1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Support short uuid for scripts

This commit is contained in:
Chocobozzz 2021-08-17 11:06:10 +02:00
parent 66a7fc9473
commit c186a67f90
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 26 additions and 17 deletions

View file

@ -52,8 +52,13 @@ function runTests (objectStorage: boolean) {
if (objectStorage) await ObjectStorageCommand.prepareDefaultBuckets()
for (let i = 1; i <= 5; i++) {
const { uuid } = await servers[0].videos.upload({ attributes: { name: 'video' + i } })
videosUUID.push(uuid)
const { uuid, shortUUID } = await servers[0].videos.upload({ attributes: { name: 'video' + i } })
if (i > 2) {
videosUUID.push(uuid)
} else {
videosUUID.push(shortUUID)
}
}
await waitJobs(servers)
@ -88,7 +93,7 @@ function runTests (objectStorage: boolean) {
for (const video of data) {
const videoDetails = await server.videos.get({ id: video.uuid })
if (video.uuid === videosUUID[1]) {
if (video.shortUUID === videosUUID[1] || video.uuid === videosUUID[1]) {
expect(videoDetails.files).to.have.lengthOf(4)
expect(videoDetails.streamingPlaylists).to.have.lengthOf(0)