diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-10 21:33:40 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-10 21:33:40 +0200 |
commit | 3fad43acfb8740f0aa81146277d91073ddf18c65 (patch) | |
tree | cba8494cac7f7dff4c02557843b6f1bf8c475352 | |
parent | 1f0f84c27ecadeb02d5ac0b188d73b84c7c40f60 (diff) | |
download | PeerTube-3fad43acfb8740f0aa81146277d91073ddf18c65.tar.gz PeerTube-3fad43acfb8740f0aa81146277d91073ddf18c65.tar.zst PeerTube-3fad43acfb8740f0aa81146277d91073ddf18c65.zip |
Server: fix real world tools
-rw-r--r-- | server/tests/real-world/tools/get-access-token.js | 7 | ||||
-rw-r--r-- | server/tests/real-world/tools/upload.js | 2 | ||||
-rw-r--r-- | server/tests/utils/clients.js | 2 |
3 files changed, 6 insertions, 5 deletions
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 @@ | |||
2 | 2 | ||
3 | const program = require('commander') | 3 | const program = require('commander') |
4 | 4 | ||
5 | const utils = require('../../api/utils') | 5 | const utilsClient = require('../../utils/clients') |
6 | const utilsLogin = require('../../utils/login') | ||
6 | 7 | ||
7 | program | 8 | program |
8 | .option('-u, --url <url>', 'Server url') | 9 | .option('-u, --url <url>', 'Server url') |
@@ -30,13 +31,13 @@ const server = { | |||
30 | } | 31 | } |
31 | } | 32 | } |
32 | 33 | ||
33 | utils.getClient(program.url, function (err, res) { | 34 | utilsClient.getClient(program.url, function (err, res) { |
34 | if (err) throw err | 35 | if (err) throw err |
35 | 36 | ||
36 | server.client.id = res.body.client_id | 37 | server.client.id = res.body.client_id |
37 | server.client.secret = res.body.client_secret | 38 | server.client.secret = res.body.client_secret |
38 | 39 | ||
39 | utils.loginAndGetAccessToken(server, function (err, accessToken) { | 40 | utilsLogin.loginAndGetAccessToken(server, function (err, accessToken) { |
40 | if (err) throw err | 41 | if (err) throw err |
41 | 42 | ||
42 | console.log(accessToken) | 43 | 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 @@ | |||
3 | const program = require('commander') | 3 | const program = require('commander') |
4 | const fs = require('fs') | 4 | const fs = require('fs') |
5 | 5 | ||
6 | const utils = require('../../api/utils') | 6 | const utils = require('../../utils/videos') |
7 | 7 | ||
8 | program | 8 | program |
9 | .option('-u, --url <url>', 'Server url') | 9 | .option('-u, --url <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 = { | |||
9 | // ---------------------- Export functions -------------------- | 9 | // ---------------------- Export functions -------------------- |
10 | 10 | ||
11 | function getClient (url, end) { | 11 | function getClient (url, end) { |
12 | const path = '/api/v1/users/client' | 12 | const path = '/api/v1/clients/local' |
13 | 13 | ||
14 | request(url) | 14 | request(url) |
15 | .get(path) | 15 | .get(path) |