aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-10-30 18:34:37 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-10-30 18:34:37 +0100
commit77c2df95857b9fbc0a5935c51ffef073ffc277b7 (patch)
treeb18cc8e1cb2c39915d6b4335f3d2b406d7b72892 /test
parente63dc45fa368de478ba3b37eabbfb1c233988348 (diff)
downloadPeerTube-77c2df95857b9fbc0a5935c51ffef073ffc277b7.tar.gz
PeerTube-77c2df95857b9fbc0a5935c51ffef073ffc277b7.tar.zst
PeerTube-77c2df95857b9fbc0a5935c51ffef073ffc277b7.zip
Fix tests
Diffstat (limited to 'test')
-rw-r--r--test/api/multiplePods.js11
-rw-r--r--test/api/singlePod.js2
2 files changed, 6 insertions, 7 deletions
diff --git a/test/api/multiplePods.js b/test/api/multiplePods.js
index fff179006..81d4b06b6 100644
--- a/test/api/multiplePods.js
+++ b/test/api/multiplePods.js
@@ -61,7 +61,7 @@
61 .end(function (err, res) { 61 .end(function (err, res) {
62 if (err) throw err 62 if (err) throw err
63 63
64 webtorrent.create(function () { 64 webtorrent.create({ host: 'client', port: '1' }, function () {
65 done() 65 done()
66 }) 66 })
67 }) 67 })
@@ -214,7 +214,7 @@
214 describe('Should seed the uploaded video', function () { 214 describe('Should seed the uploaded video', function () {
215 it('Should add the file 1 by asking pod 3', function (done) { 215 it('Should add the file 1 by asking pod 3', function (done) {
216 // Yes, this could be long 216 // Yes, this could be long
217 this.timeout(60000) 217 this.timeout(200000)
218 218
219 getVideosList(urls[2], function (err, res) { 219 getVideosList(urls[2], function (err, res) {
220 if (err) throw err 220 if (err) throw err
@@ -232,15 +232,13 @@
232 232
233 it('Should add the file 2 by asking pod 1', function (done) { 233 it('Should add the file 2 by asking pod 1', function (done) {
234 // Yes, this could be long 234 // Yes, this could be long
235 this.timeout(60000) 235 this.timeout(200000)
236 236
237 getVideosList(urls[0], function (err, res) { 237 getVideosList(urls[0], function (err, res) {
238 if (err) throw err 238 if (err) throw err
239 239
240 var video = res.body[1] 240 var video = res.body[1]
241 241
242 video_id = video._id
243
244 webtorrent.add(video.magnetUri, function (torrent) { 242 webtorrent.add(video.magnetUri, function (torrent) {
245 expect(torrent.files).to.exist 243 expect(torrent.files).to.exist
246 expect(torrent.files.length).to.equal(1) 244 expect(torrent.files.length).to.equal(1)
@@ -253,12 +251,13 @@
253 251
254 it('Should add the file 3 by asking pod 2', function (done) { 252 it('Should add the file 3 by asking pod 2', function (done) {
255 // Yes, this could be long 253 // Yes, this could be long
256 this.timeout(60000) 254 this.timeout(200000)
257 255
258 getVideosList(urls[1], function (err, res) { 256 getVideosList(urls[1], function (err, res) {
259 if (err) throw err 257 if (err) throw err
260 258
261 var video = res.body[2] 259 var video = res.body[2]
260 video_id = res.body[1]._id
262 261
263 webtorrent.add(video.magnetUri, function (torrent) { 262 webtorrent.add(video.magnetUri, function (torrent) {
264 expect(torrent.files).to.exist 263 expect(torrent.files).to.exist
diff --git a/test/api/singlePod.js b/test/api/singlePod.js
index 59a617970..149c10b9e 100644
--- a/test/api/singlePod.js
+++ b/test/api/singlePod.js
@@ -23,7 +23,7 @@
23 app = app1 23 app = app1
24 url = url1 24 url = url1
25 25
26 webtorrent.create(function () { 26 webtorrent.create({ host: 'client', port: '1' }, function () {
27 done() 27 done()
28 }) 28 })
29 }) 29 })