From bf94b6f0a1ac2cd5304f5cc7f85434120489cab8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Oct 2016 11:08:55 +0200 Subject: Server: update to webseed implementation (tests, lint...) --- server/tests/api/multiple-pods.js | 8 +------- server/tests/api/single-pod.js | 7 +------ server/tests/api/users.js | 3 --- 3 files changed, 2 insertions(+), 16 deletions(-) (limited to 'server/tests') 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 @@ const chai = require('chai') const each = require('async/each') const expect = chai.expect -const pathUtils = require('path') const series = require('async/series') +const webtorrent = new (require('webtorrent'))() const loginUtils = require('../utils/login') const miscsUtils = require('../utils/miscs') const podsUtils = require('../utils/pods') const serversUtils = require('../utils/servers') const videosUtils = require('../utils/videos') -const webtorrent = require(pathUtils.join(__dirname, '../../lib/webtorrent')) -webtorrent.silent = true describe('Test multiple pods', function () { let servers = [] @@ -53,9 +51,6 @@ describe('Test multiple pods', function () { function (next) { const server = servers[0] podsUtils.makeFriends(server.url, server.accessToken, next) - }, - function (next) { - webtorrent.create({ host: 'client', port: '1' }, next) } ], done) }) @@ -415,7 +410,6 @@ describe('Test multiple pods', function () { servers.forEach(function (server) { process.kill(-server.app.pid) }) - process.kill(-webtorrent.app.pid) // Keep the logs if the test failed 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') const keyBy = require('lodash/keyBy') const pathUtils = require('path') const series = require('async/series') +const webtorrent = new (require('webtorrent'))() const loginUtils = require('../utils/login') const miscsUtils = require('../utils/miscs') const serversUtils = require('../utils/servers') const videosUtils = require('../utils/videos') -const webtorrent = require(pathUtils.join(__dirname, '../../lib/webtorrent')) -webtorrent.silent = true describe('Test a single pod', function () { let server = null @@ -39,9 +38,6 @@ describe('Test a single pod', function () { server.accessToken = token next() }) - }, - function (next) { - webtorrent.create({ host: 'client', port: '1' }, next) } ], done) }) @@ -496,7 +492,6 @@ describe('Test a single pod', function () { after(function (done) { process.kill(-server.app.pid) - process.kill(-webtorrent.app.pid) // Keep the logs if the test failed 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 @@ const chai = require('chai') const expect = chai.expect -const pathUtils = require('path') const series = require('async/series') const loginUtils = require('../utils/login') @@ -10,8 +9,6 @@ const podsUtils = require('../utils/pods') const serversUtils = require('../utils/servers') const usersUtils = require('../utils/users') const videosUtils = require('../utils/videos') -const webtorrent = require(pathUtils.join(__dirname, '../../lib/webtorrent')) -webtorrent.silent = true describe('Test users', function () { let server = null -- cgit v1.2.3