From 3fad43acfb8740f0aa81146277d91073ddf18c65 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 10 Oct 2016 21:33:40 +0200 Subject: Server: fix real world tools --- server/tests/real-world/tools/get-access-token.js | 7 ++++--- server/tests/real-world/tools/upload.js | 2 +- server/tests/utils/clients.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'server/tests') diff --git a/server/tests/real-world/tools/get-access-token.js b/server/tests/real-world/tools/get-access-token.js index 4f98e9c9f..483cefa95 100644 --- a/server/tests/real-world/tools/get-access-token.js +++ b/server/tests/real-world/tools/get-access-token.js @@ -2,7 +2,8 @@ const program = require('commander') -const utils = require('../../api/utils') +const utilsClient = require('../../utils/clients') +const utilsLogin = require('../../utils/login') program .option('-u, --url ', 'Server url') @@ -30,13 +31,13 @@ const server = { } } -utils.getClient(program.url, function (err, res) { +utilsClient.getClient(program.url, function (err, res) { if (err) throw err server.client.id = res.body.client_id server.client.secret = res.body.client_secret - utils.loginAndGetAccessToken(server, function (err, accessToken) { + utilsLogin.loginAndGetAccessToken(server, function (err, accessToken) { if (err) throw err console.log(accessToken) diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js index 39b4c9b40..ba08028cf 100644 --- a/server/tests/real-world/tools/upload.js +++ b/server/tests/real-world/tools/upload.js @@ -3,7 +3,7 @@ const program = require('commander') const fs = require('fs') -const utils = require('../../api/utils') +const utils = require('../../utils/videos') program .option('-u, --url ', 'Server url') diff --git a/server/tests/utils/clients.js b/server/tests/utils/clients.js index e3ded493e..b3ae18d01 100644 --- a/server/tests/utils/clients.js +++ b/server/tests/utils/clients.js @@ -9,7 +9,7 @@ const clientsUtils = { // ---------------------- Export functions -------------------- function getClient (url, end) { - const path = '/api/v1/users/client' + const path = '/api/v1/clients/local' request(url) .get(path) -- cgit v1.2.3