From d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 28 Jun 2021 17:30:59 +0200 Subject: Support short uuid for GET video/playlist --- server/tests/cli/prune-storage.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'server/tests/cli') diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts index 5c9e023e1..a0af09de8 100644 --- a/server/tests/cli/prune-storage.ts +++ b/server/tests/cli/prune-storage.ts @@ -2,7 +2,10 @@ import 'mocha' import * as chai from 'chai' -import { waitJobs } from '../../../shared/extra-utils/server/jobs' +import { createFile, readdir } from 'fs-extra' +import { join } from 'path' +import { buildUUID } from '@server/helpers/uuid' +import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' import { buildServerDirectory, cleanupTests, @@ -21,11 +24,8 @@ import { uploadVideo, wait } from '../../../shared/extra-utils' +import { waitJobs } from '../../../shared/extra-utils/server/jobs' import { Account, VideoPlaylistPrivacy } from '../../../shared/models' -import { createFile, readdir } from 'fs-extra' -import { v4 as uuidv4 } from 'uuid' -import { join } from 'path' -import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' const expect = chai.expect @@ -131,8 +131,8 @@ describe('Test prune storage scripts', function () { { const base = buildServerDirectory(servers[0], 'videos') - const n1 = uuidv4() + '.mp4' - const n2 = uuidv4() + '.webm' + const n1 = buildUUID() + '.mp4' + const n2 = buildUUID() + '.webm' await createFile(join(base, n1)) await createFile(join(base, n2)) @@ -143,8 +143,8 @@ describe('Test prune storage scripts', function () { { const base = buildServerDirectory(servers[0], 'torrents') - const n1 = uuidv4() + '-240.torrent' - const n2 = uuidv4() + '-480.torrent' + const n1 = buildUUID() + '-240.torrent' + const n2 = buildUUID() + '-480.torrent' await createFile(join(base, n1)) await createFile(join(base, n2)) @@ -155,8 +155,8 @@ describe('Test prune storage scripts', function () { { const base = buildServerDirectory(servers[0], 'thumbnails') - const n1 = uuidv4() + '.jpg' - const n2 = uuidv4() + '.jpg' + const n1 = buildUUID() + '.jpg' + const n2 = buildUUID() + '.jpg' await createFile(join(base, n1)) await createFile(join(base, n2)) @@ -167,8 +167,8 @@ describe('Test prune storage scripts', function () { { const base = buildServerDirectory(servers[0], 'previews') - const n1 = uuidv4() + '.jpg' - const n2 = uuidv4() + '.jpg' + const n1 = buildUUID() + '.jpg' + const n2 = buildUUID() + '.jpg' await createFile(join(base, n1)) await createFile(join(base, n2)) @@ -179,8 +179,8 @@ describe('Test prune storage scripts', function () { { const base = buildServerDirectory(servers[0], 'avatars') - const n1 = uuidv4() + '.png' - const n2 = uuidv4() + '.jpg' + const n1 = buildUUID() + '.png' + const n2 = buildUUID() + '.jpg' await createFile(join(base, n1)) await createFile(join(base, n2)) -- cgit v1.2.3