diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/videos.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts index 7f8bd39c0..2a9a236ca 100644 --- a/server/tests/utils/videos.ts +++ b/server/tests/utils/videos.ts | |||
@@ -196,14 +196,14 @@ function uploadVideo (url: string, accessToken: string, videoAttributesArg: Vide | |||
196 | req.field('tags[' + i + ']', attributes.tags[i]) | 196 | req.field('tags[' + i + ']', attributes.tags[i]) |
197 | } | 197 | } |
198 | 198 | ||
199 | let filepath = '' | 199 | let filePath = '' |
200 | if (isAbsolute(attributes.fixture)) { | 200 | if (isAbsolute(attributes.fixture)) { |
201 | filepath = attributes.fixture | 201 | filePath = attributes.fixture |
202 | } else { | 202 | } else { |
203 | filepath = join(__dirname, '..', 'api', 'fixtures', attributes.fixture) | 203 | filePath = join(__dirname, '..', 'api', 'fixtures', attributes.fixture) |
204 | } | 204 | } |
205 | 205 | ||
206 | return req.attach('videofile', filepath) | 206 | return req.attach('videofile', filePath) |
207 | .expect(specialStatus) | 207 | .expect(specialStatus) |
208 | } | 208 | } |
209 | 209 | ||
@@ -238,9 +238,9 @@ function rateVideo (url: string, accessToken: string, id: number, rating: string | |||
238 | .expect(specialStatus) | 238 | .expect(specialStatus) |
239 | } | 239 | } |
240 | 240 | ||
241 | function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolutionLabel: string) { | 241 | function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolution: number) { |
242 | return new Promise<any>((res, rej) => { | 242 | return new Promise<any>((res, rej) => { |
243 | const torrentName = videoUUID + '-' + resolutionLabel + '.torrent' | 243 | const torrentName = videoUUID + '-' + resolution + '.torrent' |
244 | const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName) | 244 | const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName) |
245 | readFile(torrentPath, (err, data) => { | 245 | readFile(torrentPath, (err, data) => { |
246 | if (err) return rej(err) | 246 | if (err) return rej(err) |