diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-07 09:48:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-07 09:57:35 +0200 |
commit | 99d103019c76c517ba607a0fab8022aa6d08ef2e (patch) | |
tree | 7132bede03e32ab27d0f43de024b2080b473454f /server/tests/api | |
parent | 28be89161aab245526d64f6fb7dd29391a97fe0a (diff) | |
download | PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.tar.gz PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.tar.zst PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.zip |
Move fixtures in tests/
Diffstat (limited to 'server/tests/api')
26 files changed, 20 insertions, 21 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index e8a6ffd19..dba57778d 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -279,7 +279,7 @@ describe('Test users API validators', function () { | |||
279 | it('Should fail without an incorrect input file', async function () { | 279 | it('Should fail without an incorrect input file', async function () { |
280 | const fields = {} | 280 | const fields = {} |
281 | const attaches = { | 281 | const attaches = { |
282 | 'avatarfile': join(__dirname, '..', 'fixtures', 'video_short.mp4') | 282 | 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') |
283 | } | 283 | } |
284 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | 284 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) |
285 | }) | 285 | }) |
@@ -287,7 +287,7 @@ describe('Test users API validators', function () { | |||
287 | it('Should fail with a big file', async function () { | 287 | it('Should fail with a big file', async function () { |
288 | const fields = {} | 288 | const fields = {} |
289 | const attaches = { | 289 | const attaches = { |
290 | 'avatarfile': join(__dirname, '..', 'fixtures', 'avatar-big.png') | 290 | 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') |
291 | } | 291 | } |
292 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | 292 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) |
293 | }) | 293 | }) |
@@ -295,7 +295,7 @@ describe('Test users API validators', function () { | |||
295 | it('Should succeed with the correct params', async function () { | 295 | it('Should succeed with the correct params', async function () { |
296 | const fields = {} | 296 | const fields = {} |
297 | const attaches = { | 297 | const attaches = { |
298 | 'avatarfile': join(__dirname, '..', 'fixtures', 'avatar.png') | 298 | 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') |
299 | } | 299 | } |
300 | await makeUploadRequest({ | 300 | await makeUploadRequest({ |
301 | url: server.url, | 301 | url: server.url, |
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 7b40b91e7..bc6c7fc46 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -163,7 +163,7 @@ describe('Test videos API validator', function () { | |||
163 | describe('When adding a video', function () { | 163 | describe('When adding a video', function () { |
164 | let baseCorrectParams | 164 | let baseCorrectParams |
165 | const baseCorrectAttaches = { | 165 | const baseCorrectAttaches = { |
166 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short.webm') | 166 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short.webm') |
167 | } | 167 | } |
168 | 168 | ||
169 | before(function () { | 169 | before(function () { |
@@ -313,7 +313,7 @@ describe('Test videos API validator', function () { | |||
313 | it('Should fail without an incorrect input file', async function () { | 313 | it('Should fail without an incorrect input file', async function () { |
314 | const fields = baseCorrectParams | 314 | const fields = baseCorrectParams |
315 | const attaches = { | 315 | const attaches = { |
316 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 316 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
317 | } | 317 | } |
318 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 318 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
319 | }) | 319 | }) |
@@ -321,8 +321,8 @@ describe('Test videos API validator', function () { | |||
321 | it('Should fail with an incorrect thumbnail file', async function () { | 321 | it('Should fail with an incorrect thumbnail file', async function () { |
322 | const fields = baseCorrectParams | 322 | const fields = baseCorrectParams |
323 | const attaches = { | 323 | const attaches = { |
324 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar.png'), | 324 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png'), |
325 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 325 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
326 | } | 326 | } |
327 | 327 | ||
328 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 328 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -331,8 +331,8 @@ describe('Test videos API validator', function () { | |||
331 | it('Should fail with a big thumbnail file', async function () { | 331 | it('Should fail with a big thumbnail file', async function () { |
332 | const fields = baseCorrectParams | 332 | const fields = baseCorrectParams |
333 | const attaches = { | 333 | const attaches = { |
334 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar-big.png'), | 334 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png'), |
335 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 335 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
336 | } | 336 | } |
337 | 337 | ||
338 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 338 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -341,8 +341,8 @@ describe('Test videos API validator', function () { | |||
341 | it('Should fail with an incorrect preview file', async function () { | 341 | it('Should fail with an incorrect preview file', async function () { |
342 | const fields = baseCorrectParams | 342 | const fields = baseCorrectParams |
343 | const attaches = { | 343 | const attaches = { |
344 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar.png'), | 344 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png'), |
345 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 345 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
346 | } | 346 | } |
347 | 347 | ||
348 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 348 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -351,8 +351,8 @@ describe('Test videos API validator', function () { | |||
351 | it('Should fail with a big preview file', async function () { | 351 | it('Should fail with a big preview file', async function () { |
352 | const fields = baseCorrectParams | 352 | const fields = baseCorrectParams |
353 | const attaches = { | 353 | const attaches = { |
354 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar-big.png'), | 354 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png'), |
355 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 355 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
356 | } | 356 | } |
357 | 357 | ||
358 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 358 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -377,7 +377,7 @@ describe('Test videos API validator', function () { | |||
377 | 377 | ||
378 | { | 378 | { |
379 | const attaches = immutableAssign(baseCorrectAttaches, { | 379 | const attaches = immutableAssign(baseCorrectAttaches, { |
380 | videofile: join(__dirname, '..', 'fixtures', 'video_short.mp4') | 380 | videofile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') |
381 | }) | 381 | }) |
382 | 382 | ||
383 | await makeUploadRequest({ | 383 | await makeUploadRequest({ |
@@ -392,7 +392,7 @@ describe('Test videos API validator', function () { | |||
392 | 392 | ||
393 | { | 393 | { |
394 | const attaches = immutableAssign(baseCorrectAttaches, { | 394 | const attaches = immutableAssign(baseCorrectAttaches, { |
395 | videofile: join(__dirname, '..', 'fixtures', 'video_short.ogv') | 395 | videofile: join(__dirname, '..', '..', 'fixtures', 'video_short.ogv') |
396 | }) | 396 | }) |
397 | 397 | ||
398 | await makeUploadRequest({ | 398 | await makeUploadRequest({ |
@@ -510,7 +510,7 @@ describe('Test videos API validator', function () { | |||
510 | it('Should fail with an incorrect thumbnail file', async function () { | 510 | it('Should fail with an incorrect thumbnail file', async function () { |
511 | const fields = baseCorrectParams | 511 | const fields = baseCorrectParams |
512 | const attaches = { | 512 | const attaches = { |
513 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar.png') | 513 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') |
514 | } | 514 | } |
515 | 515 | ||
516 | await makeUploadRequest({ | 516 | await makeUploadRequest({ |
@@ -526,7 +526,7 @@ describe('Test videos API validator', function () { | |||
526 | it('Should fail with a big thumbnail file', async function () { | 526 | it('Should fail with a big thumbnail file', async function () { |
527 | const fields = baseCorrectParams | 527 | const fields = baseCorrectParams |
528 | const attaches = { | 528 | const attaches = { |
529 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar-big.png') | 529 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') |
530 | } | 530 | } |
531 | 531 | ||
532 | await makeUploadRequest({ | 532 | await makeUploadRequest({ |
@@ -542,7 +542,7 @@ describe('Test videos API validator', function () { | |||
542 | it('Should fail with an incorrect preview file', async function () { | 542 | it('Should fail with an incorrect preview file', async function () { |
543 | const fields = baseCorrectParams | 543 | const fields = baseCorrectParams |
544 | const attaches = { | 544 | const attaches = { |
545 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar.png') | 545 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') |
546 | } | 546 | } |
547 | 547 | ||
548 | await makeUploadRequest({ | 548 | await makeUploadRequest({ |
@@ -558,7 +558,7 @@ describe('Test videos API validator', function () { | |||
558 | it('Should fail with a big preview file', async function () { | 558 | it('Should fail with a big preview file', async function () { |
559 | const fields = baseCorrectParams | 559 | const fields = baseCorrectParams |
560 | const attaches = { | 560 | const attaches = { |
561 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar-big.png') | 561 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') |
562 | } | 562 | } |
563 | 563 | ||
564 | await makeUploadRequest({ | 564 | await makeUploadRequest({ |
diff --git a/server/tests/api/fixtures/avatar-big.png b/server/tests/api/fixtures/avatar-big.png deleted file mode 100644 index e593e40da..000000000 --- a/server/tests/api/fixtures/avatar-big.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/avatar-resized.png b/server/tests/api/fixtures/avatar-resized.png deleted file mode 100644 index 9d84151f8..000000000 --- a/server/tests/api/fixtures/avatar-resized.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/avatar.png b/server/tests/api/fixtures/avatar.png deleted file mode 100644 index 4b7fd2c0a..000000000 --- a/server/tests/api/fixtures/avatar.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/avatar2-resized.png b/server/tests/api/fixtures/avatar2-resized.png deleted file mode 100644 index 44149facb..000000000 --- a/server/tests/api/fixtures/avatar2-resized.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/avatar2.png b/server/tests/api/fixtures/avatar2.png deleted file mode 100644 index dae702190..000000000 --- a/server/tests/api/fixtures/avatar2.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/preview.jpg b/server/tests/api/fixtures/preview.jpg deleted file mode 100644 index c40ece838..000000000 --- a/server/tests/api/fixtures/preview.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/thumbnail.jpg b/server/tests/api/fixtures/thumbnail.jpg deleted file mode 100644 index cc3af8a4a..000000000 --- a/server/tests/api/fixtures/thumbnail.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_60fps_short.mp4 b/server/tests/api/fixtures/video_60fps_short.mp4 deleted file mode 100644 index ff0593cf3..000000000 --- a/server/tests/api/fixtures/video_60fps_short.mp4 +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short-480.webm b/server/tests/api/fixtures/video_short-480.webm deleted file mode 100644 index 3145105e1..000000000 --- a/server/tests/api/fixtures/video_short-480.webm +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short.mp4 b/server/tests/api/fixtures/video_short.mp4 deleted file mode 100644 index 35678362b..000000000 --- a/server/tests/api/fixtures/video_short.mp4 +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short.mp4.jpg b/server/tests/api/fixtures/video_short.mp4.jpg deleted file mode 100644 index 48790ffec..000000000 --- a/server/tests/api/fixtures/video_short.mp4.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short.ogv b/server/tests/api/fixtures/video_short.ogv deleted file mode 100644 index 9e253da82..000000000 --- a/server/tests/api/fixtures/video_short.ogv +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short.ogv.jpg b/server/tests/api/fixtures/video_short.ogv.jpg deleted file mode 100644 index c4c1d00e5..000000000 --- a/server/tests/api/fixtures/video_short.ogv.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short.webm b/server/tests/api/fixtures/video_short.webm deleted file mode 100644 index bf4b0ab6c..000000000 --- a/server/tests/api/fixtures/video_short.webm +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short.webm.jpg b/server/tests/api/fixtures/video_short.webm.jpg deleted file mode 100644 index b0dffd099..000000000 --- a/server/tests/api/fixtures/video_short.webm.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short1-preview.webm.jpg b/server/tests/api/fixtures/video_short1-preview.webm.jpg deleted file mode 100644 index d2a068b78..000000000 --- a/server/tests/api/fixtures/video_short1-preview.webm.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short1.webm b/server/tests/api/fixtures/video_short1.webm deleted file mode 100644 index 70ac0c644..000000000 --- a/server/tests/api/fixtures/video_short1.webm +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short1.webm.jpg b/server/tests/api/fixtures/video_short1.webm.jpg deleted file mode 100644 index 2db21975c..000000000 --- a/server/tests/api/fixtures/video_short1.webm.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short2.webm b/server/tests/api/fixtures/video_short2.webm deleted file mode 100644 index 13d72dff7..000000000 --- a/server/tests/api/fixtures/video_short2.webm +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short2.webm.jpg b/server/tests/api/fixtures/video_short2.webm.jpg deleted file mode 100644 index ed5952e04..000000000 --- a/server/tests/api/fixtures/video_short2.webm.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short3.webm b/server/tests/api/fixtures/video_short3.webm deleted file mode 100644 index cde5dcd58..000000000 --- a/server/tests/api/fixtures/video_short3.webm +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short3.webm.jpg b/server/tests/api/fixtures/video_short3.webm.jpg deleted file mode 100644 index b7c41cc1a..000000000 --- a/server/tests/api/fixtures/video_short3.webm.jpg +++ /dev/null | |||
Binary files differ | |||
diff --git a/server/tests/api/fixtures/video_short_fake.webm b/server/tests/api/fixtures/video_short_fake.webm deleted file mode 100644 index d85290ae5..000000000 --- a/server/tests/api/fixtures/video_short_fake.webm +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | this is a fake video mouahahah | ||
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index fc7c0cb21..5f9a76621 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -938,7 +938,7 @@ describe('Test multiple servers', function () { | |||
938 | .field('channelId', '1') | 938 | .field('channelId', '1') |
939 | .field('commentsEnabled', 'true') | 939 | .field('commentsEnabled', 'true') |
940 | 940 | ||
941 | const filePath = join(__dirname, '..', '..', 'api', 'fixtures', 'video_short.webm') | 941 | const filePath = join(__dirname, '..', '..', 'fixtures', 'video_short.webm') |
942 | 942 | ||
943 | await req.attach('videofile', filePath) | 943 | await req.attach('videofile', filePath) |
944 | .expect(200) | 944 | .expect(200) |