diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 17:17:52 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 17:17:52 +0200 |
commit | 1a42c9e2c0fb64cdbebd81b311736e752f591e0a (patch) | |
tree | e893324d730878257491428ffca634a92f1eea05 /server/tests/api/friendsAdvanced.js | |
parent | d56ec0d4129160a6e3b51ace3766bb325db1f101 (diff) | |
download | PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.tar.gz PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.tar.zst PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.zip |
Server: udpate async to 2.0.0
Diffstat (limited to 'server/tests/api/friendsAdvanced.js')
-rw-r--r-- | server/tests/api/friendsAdvanced.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/server/tests/api/friendsAdvanced.js b/server/tests/api/friendsAdvanced.js index b082270ff..603fbc16b 100644 --- a/server/tests/api/friendsAdvanced.js +++ b/server/tests/api/friendsAdvanced.js | |||
@@ -1,8 +1,9 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const async = require('async') | ||
4 | const chai = require('chai') | 3 | const chai = require('chai') |
4 | const each = require('async/each') | ||
5 | const expect = chai.expect | 5 | const expect = chai.expect |
6 | const series = require('async/series') | ||
6 | 7 | ||
7 | const utils = require('./utils') | 8 | const utils = require('./utils') |
8 | 9 | ||
@@ -45,7 +46,7 @@ describe('Test advanced friends', function () { | |||
45 | utils.flushAndRunMultipleServers(6, function (serversRun, urlsRun) { | 46 | utils.flushAndRunMultipleServers(6, function (serversRun, urlsRun) { |
46 | servers = serversRun | 47 | servers = serversRun |
47 | 48 | ||
48 | async.each(servers, function (server, callbackEach) { | 49 | each(servers, function (server, callbackEach) { |
49 | utils.loginAndGetAccessToken(server, function (err, accessToken) { | 50 | utils.loginAndGetAccessToken(server, function (err, accessToken) { |
50 | if (err) return callbackEach(err) | 51 | if (err) return callbackEach(err) |
51 | 52 | ||
@@ -59,7 +60,7 @@ describe('Test advanced friends', function () { | |||
59 | it('Should make friends with two pod each in a different group', function (done) { | 60 | it('Should make friends with two pod each in a different group', function (done) { |
60 | this.timeout(20000) | 61 | this.timeout(20000) |
61 | 62 | ||
62 | async.series([ | 63 | series([ |
63 | // Pod 3 makes friend with the first one | 64 | // Pod 3 makes friend with the first one |
64 | function (next) { | 65 | function (next) { |
65 | makeFriends(3, next) | 66 | makeFriends(3, next) |
@@ -93,7 +94,7 @@ describe('Test advanced friends', function () { | |||
93 | it('Should quit all friends', function (done) { | 94 | it('Should quit all friends', function (done) { |
94 | this.timeout(10000) | 95 | this.timeout(10000) |
95 | 96 | ||
96 | async.series([ | 97 | series([ |
97 | function (next) { | 98 | function (next) { |
98 | quitFriends(1, next) | 99 | quitFriends(1, next) |
99 | }, | 100 | }, |
@@ -103,7 +104,7 @@ describe('Test advanced friends', function () { | |||
103 | function (err) { | 104 | function (err) { |
104 | if (err) throw err | 105 | if (err) throw err |
105 | 106 | ||
106 | async.each([ 1, 2, 3, 4, 5, 6 ], function (i, callback) { | 107 | each([ 1, 2, 3, 4, 5, 6 ], function (i, callback) { |
107 | getFriendsList(i, function (err, res) { | 108 | getFriendsList(i, function (err, res) { |
108 | if (err) throw err | 109 | if (err) throw err |
109 | 110 | ||
@@ -119,7 +120,7 @@ describe('Test advanced friends', function () { | |||
119 | it('Should make friends with the pods 1, 2, 3', function (done) { | 120 | it('Should make friends with the pods 1, 2, 3', function (done) { |
120 | this.timeout(150000) | 121 | this.timeout(150000) |
121 | 122 | ||
122 | async.series([ | 123 | series([ |
123 | // Pods 1, 2, 3 and 4 become friends | 124 | // Pods 1, 2, 3 and 4 become friends |
124 | function (next) { | 125 | function (next) { |
125 | makeFriends(2, next) | 126 | makeFriends(2, next) |
@@ -132,7 +133,7 @@ describe('Test advanced friends', function () { | |||
132 | }, | 133 | }, |
133 | // Check the pods 1, 2, 3 and 4 are friends | 134 | // Check the pods 1, 2, 3 and 4 are friends |
134 | function (next) { | 135 | function (next) { |
135 | async.each([ 1, 2, 3, 4 ], function (i, callback) { | 136 | each([ 1, 2, 3, 4 ], function (i, callback) { |
136 | getFriendsList(i, function (err, res) { | 137 | getFriendsList(i, function (err, res) { |
137 | if (err) throw err | 138 | if (err) throw err |
138 | 139 | ||
@@ -211,7 +212,7 @@ describe('Test advanced friends', function () { | |||
211 | it('Should pod 1 quit friends', function (done) { | 212 | it('Should pod 1 quit friends', function (done) { |
212 | this.timeout(25000) | 213 | this.timeout(25000) |
213 | 214 | ||
214 | async.series([ | 215 | series([ |
215 | // Upload a video on server 3 for aditionnal tests | 216 | // Upload a video on server 3 for aditionnal tests |
216 | function (next) { | 217 | function (next) { |
217 | uploadVideo(3, next) | 218 | uploadVideo(3, next) |