aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/friendsAdvanced.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/friendsAdvanced.js')
-rw-r--r--server/tests/api/friendsAdvanced.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/server/tests/api/friendsAdvanced.js b/server/tests/api/friendsAdvanced.js
index 6f18648d7..833a530dd 100644
--- a/server/tests/api/friendsAdvanced.js
+++ b/server/tests/api/friendsAdvanced.js
@@ -9,44 +9,44 @@ const utils = require('./utils')
9describe('Test advanced friends', function () { 9describe('Test advanced friends', function () {
10 let servers = [] 10 let servers = []
11 11
12 function makeFriends (pod_number, callback) { 12 function makeFriends (podNumber, callback) {
13 return utils.makeFriends(servers[pod_number - 1].url, callback) 13 return utils.makeFriends(servers[podNumber - 1].url, callback)
14 } 14 }
15 15
16 function quitFriends (pod_number, callback) { 16 function quitFriends (podNumber, callback) {
17 return utils.quitFriends(servers[pod_number - 1].url, callback) 17 return utils.quitFriends(servers[podNumber - 1].url, callback)
18 } 18 }
19 19
20 function getFriendsList (pod_number, end) { 20 function getFriendsList (podNumber, end) {
21 return utils.getFriendsList(servers[pod_number - 1].url, end) 21 return utils.getFriendsList(servers[podNumber - 1].url, end)
22 } 22 }
23 23
24 function uploadVideo (pod_number, callback) { 24 function uploadVideo (podNumber, callback) {
25 const name = 'my super video' 25 const name = 'my super video'
26 const description = 'my super description' 26 const description = 'my super description'
27 const fixture = 'video_short.webm' 27 const fixture = 'video_short.webm'
28 const server = servers[pod_number - 1] 28 const server = servers[podNumber - 1]
29 29
30 return utils.uploadVideo(server.url, server.access_token, name, description, fixture, callback) 30 return utils.uploadVideo(server.url, server.access_token, name, description, fixture, callback)
31 } 31 }
32 32
33 function getVideos (pod_number, callback) { 33 function getVideos (podNumber, callback) {
34 return utils.getVideosList(servers[pod_number - 1].url, callback) 34 return utils.getVideosList(servers[podNumber - 1].url, callback)
35 } 35 }
36 36
37 // --------------------------------------------------------------- 37 // ---------------------------------------------------------------
38 38
39 before(function (done) { 39 before(function (done) {
40 this.timeout(30000) 40 this.timeout(30000)
41 utils.flushAndRunMultipleServers(6, function (servers_run, urls_run) { 41 utils.flushAndRunMultipleServers(6, function (serversRun, urlsRun) {
42 servers = servers_run 42 servers = serversRun
43 43
44 async.each(servers, function (server, callback_each) { 44 async.each(servers, function (server, callbackEach) {
45 utils.loginAndGetAccessToken(server, function (err, access_token) { 45 utils.loginAndGetAccessToken(server, function (err, accessToken) {
46 if (err) return callback_each(err) 46 if (err) return callbackEach(err)
47 47
48 server.access_token = access_token 48 server.accessToken = accessToken
49 callback_each() 49 callbackEach()
50 }) 50 })
51 }, done) 51 }, done)
52 }) 52 })