aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/regenerate-thumbnails.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/regenerate-thumbnails.ts')
-rw-r--r--server/tests/cli/regenerate-thumbnails.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/tests/cli/regenerate-thumbnails.ts b/server/tests/cli/regenerate-thumbnails.ts
index d59520783..2df1a1157 100644
--- a/server/tests/cli/regenerate-thumbnails.ts
+++ b/server/tests/cli/regenerate-thumbnails.ts
@@ -15,7 +15,7 @@ import {
15} from '../../../shared/extra-utils' 15} from '../../../shared/extra-utils'
16 16
17async function testThumbnail (server: ServerInfo, videoId: number | string) { 17async function testThumbnail (server: ServerInfo, videoId: number | string) {
18 const video = await server.videosCommand.get({ id: videoId }) 18 const video = await server.videos.get({ id: videoId })
19 19
20 const requests = [ 20 const requests = [
21 makeRawRequest(join(server.url, video.thumbnailPath), HttpStatusCode.OK_200), 21 makeRawRequest(join(server.url, video.thumbnailPath), HttpStatusCode.OK_200),
@@ -47,22 +47,22 @@ describe('Test regenerate thumbnails script', function () {
47 await doubleFollow(servers[0], servers[1]) 47 await doubleFollow(servers[0], servers[1])
48 48
49 { 49 {
50 const videoUUID1 = (await servers[0].videosCommand.quickUpload({ name: 'video 1' })).uuid 50 const videoUUID1 = (await servers[0].videos.quickUpload({ name: 'video 1' })).uuid
51 video1 = await servers[0].videosCommand.get({ id: videoUUID1 }) 51 video1 = await servers[0].videos.get({ id: videoUUID1 })
52 52
53 thumbnail1Path = join(servers[0].serversCommand.buildDirectory('thumbnails'), basename(video1.thumbnailPath)) 53 thumbnail1Path = join(servers[0].servers.buildDirectory('thumbnails'), basename(video1.thumbnailPath))
54 54
55 const videoUUID2 = (await servers[0].videosCommand.quickUpload({ name: 'video 2' })).uuid 55 const videoUUID2 = (await servers[0].videos.quickUpload({ name: 'video 2' })).uuid
56 video2 = await servers[0].videosCommand.get({ id: videoUUID2 }) 56 video2 = await servers[0].videos.get({ id: videoUUID2 })
57 } 57 }
58 58
59 { 59 {
60 const videoUUID = (await servers[1].videosCommand.quickUpload({ name: 'video 3' })).uuid 60 const videoUUID = (await servers[1].videos.quickUpload({ name: 'video 3' })).uuid
61 await waitJobs(servers) 61 await waitJobs(servers)
62 62
63 remoteVideo = await servers[0].videosCommand.get({ id: videoUUID }) 63 remoteVideo = await servers[0].videos.get({ id: videoUUID })
64 64
65 thumbnailRemotePath = join(servers[0].serversCommand.buildDirectory('thumbnails'), basename(remoteVideo.thumbnailPath)) 65 thumbnailRemotePath = join(servers[0].servers.buildDirectory('thumbnails'), basename(remoteVideo.thumbnailPath))
66 } 66 }
67 67
68 await writeFile(thumbnail1Path, '') 68 await writeFile(thumbnail1Path, '')
@@ -89,7 +89,7 @@ describe('Test regenerate thumbnails script', function () {
89 it('Should regenerate local thumbnails from the CLI', async function () { 89 it('Should regenerate local thumbnails from the CLI', async function () {
90 this.timeout(15000) 90 this.timeout(15000)
91 91
92 await servers[0].cliCommand.execWithEnv(`npm run regenerate-thumbnails`) 92 await servers[0].cli.execWithEnv(`npm run regenerate-thumbnails`)
93 }) 93 })
94 94
95 it('Should have generated new thumbnail files', async function () { 95 it('Should have generated new thumbnail files', async function () {