diff options
author | Green-Star <Green-Star@users.noreply.github.com> | 2017-07-02 20:48:31 +0200 |
---|---|---|
committer | Bigard Florian <florian.bigard@gmail.com> | 2017-07-02 20:48:31 +0200 |
commit | 5fe7e898316e18369c3e1aba307b55077adc7bfb (patch) | |
tree | 1ea859558b44250dce43be1be7261c2e79df454b /server/tests/api/check-params | |
parent | ba44fa19531186944fef3e9da34f5e91f0c0dedb (diff) | |
download | PeerTube-5fe7e898316e18369c3e1aba307b55077adc7bfb.tar.gz PeerTube-5fe7e898316e18369c3e1aba307b55077adc7bfb.tar.zst PeerTube-5fe7e898316e18369c3e1aba307b55077adc7bfb.zip |
Fix test (#71)
* Fix timeouting tests
* Increase timeout to be sure requests will be propagated
* Add timeout to be sure video views will be updated
* Use standard style
* Fix PR comments.
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/users.js | 2 | ||||
-rw-r--r-- | server/tests/api/check-params/video-blacklists.js | 2 | ||||
-rw-r--r-- | server/tests/api/check-params/videos.js | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/server/tests/api/check-params/users.js b/server/tests/api/check-params/users.js index 0ba5e77c3..2c1189f7a 100644 --- a/server/tests/api/check-params/users.js +++ b/server/tests/api/check-params/users.js | |||
@@ -23,7 +23,7 @@ describe('Test users API validators', function () { | |||
23 | // --------------------------------------------------------------- | 23 | // --------------------------------------------------------------- |
24 | 24 | ||
25 | before(function (done) { | 25 | before(function (done) { |
26 | this.timeout(20000) | 26 | this.timeout(120000) |
27 | 27 | ||
28 | series([ | 28 | series([ |
29 | function (next) { | 29 | function (next) { |
diff --git a/server/tests/api/check-params/video-blacklists.js b/server/tests/api/check-params/video-blacklists.js index a39ab0cfa..53b503e56 100644 --- a/server/tests/api/check-params/video-blacklists.js +++ b/server/tests/api/check-params/video-blacklists.js | |||
@@ -17,7 +17,7 @@ describe('Test video blacklists API validators', function () { | |||
17 | // --------------------------------------------------------------- | 17 | // --------------------------------------------------------------- |
18 | 18 | ||
19 | before(function (done) { | 19 | before(function (done) { |
20 | this.timeout(20000) | 20 | this.timeout(120000) |
21 | 21 | ||
22 | series([ | 22 | series([ |
23 | function (next) { | 23 | function (next) { |
diff --git a/server/tests/api/check-params/videos.js b/server/tests/api/check-params/videos.js index ec4cc4ce8..ce6c49583 100644 --- a/server/tests/api/check-params/videos.js +++ b/server/tests/api/check-params/videos.js | |||
@@ -378,7 +378,7 @@ describe('Test videos API validator', function () { | |||
378 | }) | 378 | }) |
379 | 379 | ||
380 | it('Should succeed with the correct parameters', function (done) { | 380 | it('Should succeed with the correct parameters', function (done) { |
381 | this.timeout(5000) | 381 | this.timeout(10000) |
382 | 382 | ||
383 | const data = { | 383 | const data = { |
384 | name: 'my super name', | 384 | name: 'my super name', |
@@ -392,6 +392,7 @@ describe('Test videos API validator', function () { | |||
392 | const attach = { | 392 | const attach = { |
393 | 'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short.webm') | 393 | 'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short.webm') |
394 | } | 394 | } |
395 | |||
395 | requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, function () { | 396 | requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, function () { |
396 | attach.videofile = pathUtils.join(__dirname, '..', 'fixtures', 'video_short.mp4') | 397 | attach.videofile = pathUtils.join(__dirname, '..', 'fixtures', 'video_short.mp4') |
397 | requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, function () { | 398 | requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, function () { |