From a4254ea1738d3b963fd4ccb995ab63f70656d6c0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Nov 2016 20:45:00 +0100 Subject: Server: adapt tests to host --- server/tests/utils/pods.js | 20 ++++++++++---------- server/tests/utils/servers.js | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/pods.js b/server/tests/utils/pods.js index a8551a49d..25b97edec 100644 --- a/server/tests/utils/pods.js +++ b/server/tests/utils/pods.js @@ -30,25 +30,25 @@ function makeFriends (url, accessToken, expectedStatus, end) { // Which pod makes friends with which pod const friendsMatrix = { 'http://localhost:9001': [ - 'http://localhost:9002' + 'localhost:9002' ], 'http://localhost:9002': [ - 'http://localhost:9003' + 'localhost:9003' ], 'http://localhost:9003': [ - 'http://localhost:9001' + 'localhost:9001' ], 'http://localhost:9004': [ - 'http://localhost:9002' + 'localhost:9002' ], 'http://localhost:9005': [ - 'http://localhost:9001', - 'http://localhost:9004' + 'localhost:9001', + 'localhost:9004' ], 'http://localhost:9006': [ - 'http://localhost:9001', - 'http://localhost:9002', - 'http://localhost:9003' + 'localhost:9001', + 'localhost:9002', + 'localhost:9003' ] } const path = '/api/v1/pods/makefriends' @@ -58,7 +58,7 @@ function makeFriends (url, accessToken, expectedStatus, end) { .post(path) .set('Accept', 'application/json') .set('Authorization', 'Bearer ' + accessToken) - .send({ 'urls': friendsMatrix[url] }) + .send({ 'hosts': friendsMatrix[url] }) .expect(expectedStatus) .end(function (err, res) { if (err) throw err diff --git a/server/tests/utils/servers.js b/server/tests/utils/servers.js index d62838bc7..01c9a2f39 100644 --- a/server/tests/utils/servers.js +++ b/server/tests/utils/servers.js @@ -47,6 +47,7 @@ function runServer (number, callback) { const server = { app: null, url: `http://localhost:${9000 + number}`, + host: `localhost:${9000 + number}`, client: { id: null, secret: null -- cgit v1.2.3