diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-09 11:06:13 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-09 11:17:36 +0200 |
commit | 14d3270f363245d2c83fcc2ac109e39743b5627e (patch) | |
tree | 22a1d40675d372d53c35a4d7adf1fc1b4ceb1799 /server/tests/utils | |
parent | aa8b6df4a51c82eb91e6fd71a090b2128098af6b (diff) | |
download | PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.tar.gz PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.tar.zst PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.zip |
Change how we handle resolution
It was an enum before, now we just use video height
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) |