aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/multiple-pods.js8
-rw-r--r--server/tests/api/single-pod.js7
-rw-r--r--server/tests/api/users.js3
3 files changed, 2 insertions, 16 deletions
diff --git a/server/tests/api/multiple-pods.js b/server/tests/api/multiple-pods.js
index b86f88c22..87fab791c 100644
--- a/server/tests/api/multiple-pods.js
+++ b/server/tests/api/multiple-pods.js
@@ -3,16 +3,14 @@
3const chai = require('chai') 3const chai = require('chai')
4const each = require('async/each') 4const each = require('async/each')
5const expect = chai.expect 5const expect = chai.expect
6const pathUtils = require('path')
7const series = require('async/series') 6const series = require('async/series')
7const webtorrent = new (require('webtorrent'))()
8 8
9const loginUtils = require('../utils/login') 9const loginUtils = require('../utils/login')
10const miscsUtils = require('../utils/miscs') 10const miscsUtils = require('../utils/miscs')
11const podsUtils = require('../utils/pods') 11const podsUtils = require('../utils/pods')
12const serversUtils = require('../utils/servers') 12const serversUtils = require('../utils/servers')
13const videosUtils = require('../utils/videos') 13const videosUtils = require('../utils/videos')
14const webtorrent = require(pathUtils.join(__dirname, '../../lib/webtorrent'))
15webtorrent.silent = true
16 14
17describe('Test multiple pods', function () { 15describe('Test multiple pods', function () {
18 let servers = [] 16 let servers = []
@@ -53,9 +51,6 @@ describe('Test multiple pods', function () {
53 function (next) { 51 function (next) {
54 const server = servers[0] 52 const server = servers[0]
55 podsUtils.makeFriends(server.url, server.accessToken, next) 53 podsUtils.makeFriends(server.url, server.accessToken, next)
56 },
57 function (next) {
58 webtorrent.create({ host: 'client', port: '1' }, next)
59 } 54 }
60 ], done) 55 ], done)
61 }) 56 })
@@ -415,7 +410,6 @@ describe('Test multiple pods', function () {
415 servers.forEach(function (server) { 410 servers.forEach(function (server) {
416 process.kill(-server.app.pid) 411 process.kill(-server.app.pid)
417 }) 412 })
418 process.kill(-webtorrent.app.pid)
419 413
420 // Keep the logs if the test failed 414 // Keep the logs if the test failed
421 if (this.ok) { 415 if (this.ok) {
diff --git a/server/tests/api/single-pod.js b/server/tests/api/single-pod.js
index bdaaee46c..623a1a6a3 100644
--- a/server/tests/api/single-pod.js
+++ b/server/tests/api/single-pod.js
@@ -7,13 +7,12 @@ const fs = require('fs')
7const keyBy = require('lodash/keyBy') 7const keyBy = require('lodash/keyBy')
8const pathUtils = require('path') 8const pathUtils = require('path')
9const series = require('async/series') 9const series = require('async/series')
10const webtorrent = new (require('webtorrent'))()
10 11
11const loginUtils = require('../utils/login') 12const loginUtils = require('../utils/login')
12const miscsUtils = require('../utils/miscs') 13const miscsUtils = require('../utils/miscs')
13const serversUtils = require('../utils/servers') 14const serversUtils = require('../utils/servers')
14const videosUtils = require('../utils/videos') 15const videosUtils = require('../utils/videos')
15const webtorrent = require(pathUtils.join(__dirname, '../../lib/webtorrent'))
16webtorrent.silent = true
17 16
18describe('Test a single pod', function () { 17describe('Test a single pod', function () {
19 let server = null 18 let server = null
@@ -39,9 +38,6 @@ describe('Test a single pod', function () {
39 server.accessToken = token 38 server.accessToken = token
40 next() 39 next()
41 }) 40 })
42 },
43 function (next) {
44 webtorrent.create({ host: 'client', port: '1' }, next)
45 } 41 }
46 ], done) 42 ], done)
47 }) 43 })
@@ -496,7 +492,6 @@ describe('Test a single pod', function () {
496 492
497 after(function (done) { 493 after(function (done) {
498 process.kill(-server.app.pid) 494 process.kill(-server.app.pid)
499 process.kill(-webtorrent.app.pid)
500 495
501 // Keep the logs if the test failed 496 // Keep the logs if the test failed
502 if (this.ok) { 497 if (this.ok) {
diff --git a/server/tests/api/users.js b/server/tests/api/users.js
index c6c892bf2..94267f104 100644
--- a/server/tests/api/users.js
+++ b/server/tests/api/users.js
@@ -2,7 +2,6 @@
2 2
3const chai = require('chai') 3const chai = require('chai')
4const expect = chai.expect 4const expect = chai.expect
5const pathUtils = require('path')
6const series = require('async/series') 5const series = require('async/series')
7 6
8const loginUtils = require('../utils/login') 7const loginUtils = require('../utils/login')
@@ -10,8 +9,6 @@ const podsUtils = require('../utils/pods')
10const serversUtils = require('../utils/servers') 9const serversUtils = require('../utils/servers')
11const usersUtils = require('../utils/users') 10const usersUtils = require('../utils/users')
12const videosUtils = require('../utils/videos') 11const videosUtils = require('../utils/videos')
13const webtorrent = require(pathUtils.join(__dirname, '../../lib/webtorrent'))
14webtorrent.silent = true
15 12
16describe('Test users', function () { 13describe('Test users', function () {
17 let server = null 14 let server = null