aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-28 14:49:43 +0100
committerChocobozzz <me@florianbigard.com>2017-12-28 14:49:43 +0100
commit331128ed3512aa2c1b632e25ac7ac0174bdb3789 (patch)
tree21cf2f166bce11d1bc42598ab2ad4550fbe8a72c /server/tests/utils
parent93e4a311f37d7fc82ec81190553f8beae28fdef5 (diff)
downloadPeerTube-331128ed3512aa2c1b632e25ac7ac0174bdb3789.tar.gz
PeerTube-331128ed3512aa2c1b632e25ac7ac0174bdb3789.tar.zst
PeerTube-331128ed3512aa2c1b632e25ac7ac0174bdb3789.zip
Improve check services parameters tests
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/videos/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index f64ebd2b0..fefee4878 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -200,7 +200,7 @@ async function testVideoImage (url: string, imageName: string, imagePath: string
200 .get(imagePath) 200 .get(imagePath)
201 .expect(200) 201 .expect(200)
202 202
203 const data = await readFilePromise(join(__dirname, '..', 'api', 'fixtures', imageName + '.jpg')) 203 const data = await readFilePromise(join(__dirname, '..', '..', 'api', 'fixtures', imageName + '.jpg'))
204 204
205 return data.equals(res.body) 205 return data.equals(res.body)
206 } else { 206 } else {
@@ -257,7 +257,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
257 if (isAbsolute(attributes.fixture)) { 257 if (isAbsolute(attributes.fixture)) {
258 filePath = attributes.fixture 258 filePath = attributes.fixture
259 } else { 259 } else {
260 filePath = join(__dirname, '..', 'api', 'fixtures', attributes.fixture) 260 filePath = join(__dirname, '..', '..', 'api', 'fixtures', attributes.fixture)
261 } 261 }
262 262
263 return req.attach('videofile', filePath) 263 return req.attach('videofile', filePath)
@@ -299,7 +299,7 @@ function rateVideo (url: string, accessToken: string, id: number, rating: string
299function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolution: number) { 299function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolution: number) {
300 return new Promise<any>((res, rej) => { 300 return new Promise<any>((res, rej) => {
301 const torrentName = videoUUID + '-' + resolution + '.torrent' 301 const torrentName = videoUUID + '-' + resolution + '.torrent'
302 const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName) 302 const torrentPath = join(__dirname, '..', '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName)
303 readFile(torrentPath, (err, data) => { 303 readFile(torrentPath, (err, data) => {
304 if (err) return rej(err) 304 if (err) return rej(err)
305 305