aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-10 21:33:40 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-10 21:33:40 +0200
commit3fad43acfb8740f0aa81146277d91073ddf18c65 (patch)
treecba8494cac7f7dff4c02557843b6f1bf8c475352 /server/tests
parent1f0f84c27ecadeb02d5ac0b188d73b84c7c40f60 (diff)
downloadPeerTube-3fad43acfb8740f0aa81146277d91073ddf18c65.tar.gz
PeerTube-3fad43acfb8740f0aa81146277d91073ddf18c65.tar.zst
PeerTube-3fad43acfb8740f0aa81146277d91073ddf18c65.zip
Server: fix real world tools
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/real-world/tools/get-access-token.js7
-rw-r--r--server/tests/real-world/tools/upload.js2
-rw-r--r--server/tests/utils/clients.js2
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
3const program = require('commander') 3const program = require('commander')
4 4
5const utils = require('../../api/utils') 5const utilsClient = require('../../utils/clients')
6const utilsLogin = require('../../utils/login')
6 7
7program 8program
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
33utils.getClient(program.url, function (err, res) { 34utilsClient.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 @@
3const program = require('commander') 3const program = require('commander')
4const fs = require('fs') 4const fs = require('fs')
5 5
6const utils = require('../../api/utils') 6const utils = require('../../utils/videos')
7 7
8program 8program
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
11function getClient (url, end) { 11function 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)