diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-13 09:43:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 6c5065a011b099618681a37bd77eaa7bd3db752e (patch) | |
tree | 352252a00b25013c4b1902f6bcd9668aba295c7b /server/tests/cli/regenerate-thumbnails.ts | |
parent | 0d8ecb7592577f54012413a2b5a9b159cfc90399 (diff) | |
download | PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.tar.gz PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.tar.zst PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.zip |
Introduce server commands
Diffstat (limited to 'server/tests/cli/regenerate-thumbnails.ts')
-rw-r--r-- | server/tests/cli/regenerate-thumbnails.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/tests/cli/regenerate-thumbnails.ts b/server/tests/cli/regenerate-thumbnails.ts index 1b460e9c0..68a4711b6 100644 --- a/server/tests/cli/regenerate-thumbnails.ts +++ b/server/tests/cli/regenerate-thumbnails.ts | |||
@@ -4,7 +4,6 @@ import { writeFile } from 'fs-extra' | |||
4 | import { basename, join } from 'path' | 4 | import { basename, join } from 'path' |
5 | import { Video, VideoDetails } from '@shared/models' | 5 | import { Video, VideoDetails } from '@shared/models' |
6 | import { | 6 | import { |
7 | buildServerDirectory, | ||
8 | cleanupTests, | 7 | cleanupTests, |
9 | doubleFollow, | 8 | doubleFollow, |
10 | flushAndRunMultipleServers, | 9 | flushAndRunMultipleServers, |
@@ -50,7 +49,7 @@ describe('Test regenerate thumbnails script', function () { | |||
50 | const videoUUID1 = (await uploadVideoAndGetId({ server: servers[0], videoName: 'video 1' })).uuid | 49 | const videoUUID1 = (await uploadVideoAndGetId({ server: servers[0], videoName: 'video 1' })).uuid |
51 | video1 = await (getVideo(servers[0].url, videoUUID1).then(res => res.body)) | 50 | video1 = await (getVideo(servers[0].url, videoUUID1).then(res => res.body)) |
52 | 51 | ||
53 | thumbnail1Path = join(buildServerDirectory(servers[0], 'thumbnails'), basename(video1.thumbnailPath)) | 52 | thumbnail1Path = join(servers[0].serversCommand.buildDirectory('thumbnails'), basename(video1.thumbnailPath)) |
54 | 53 | ||
55 | const videoUUID2 = (await uploadVideoAndGetId({ server: servers[0], videoName: 'video 2' })).uuid | 54 | const videoUUID2 = (await uploadVideoAndGetId({ server: servers[0], videoName: 'video 2' })).uuid |
56 | video2 = await (getVideo(servers[0].url, videoUUID2).then(res => res.body)) | 55 | video2 = await (getVideo(servers[0].url, videoUUID2).then(res => res.body)) |
@@ -62,7 +61,7 @@ describe('Test regenerate thumbnails script', function () { | |||
62 | 61 | ||
63 | remoteVideo = await (getVideo(servers[0].url, videoUUID).then(res => res.body)) | 62 | remoteVideo = await (getVideo(servers[0].url, videoUUID).then(res => res.body)) |
64 | 63 | ||
65 | thumbnailRemotePath = join(buildServerDirectory(servers[0], 'thumbnails'), basename(remoteVideo.thumbnailPath)) | 64 | thumbnailRemotePath = join(servers[0].serversCommand.buildDirectory('thumbnails'), basename(remoteVideo.thumbnailPath)) |
66 | } | 65 | } |
67 | 66 | ||
68 | await writeFile(thumbnail1Path, '') | 67 | await writeFile(thumbnail1Path, '') |