mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-30 08:03:55 +00:00
Rename config.baseUrl to config.remoteUrl
This commit is contained in:
parent
d0cc3e54ad
commit
2fd2b702ae
@ -21,7 +21,7 @@ describe 'Auth:', ->
|
|||||||
describe 'given valid credentials', ->
|
describe 'given valid credentials', ->
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
nock(config.baseUrl)
|
nock(config.remoteUrl)
|
||||||
.post('/login_', johnDoeFixture.credentials)
|
.post('/login_', johnDoeFixture.credentials)
|
||||||
.reply(200, johnDoeFixture.token)
|
.reply(200, johnDoeFixture.token)
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ describe 'Auth:', ->
|
|||||||
describe 'given invalid credentials', ->
|
describe 'given invalid credentials', ->
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
nock(config.baseUrl)
|
nock(config.remoteUrl)
|
||||||
.post('/login_')
|
.post('/login_')
|
||||||
.reply(401)
|
.reply(401)
|
||||||
|
|
||||||
@ -87,11 +87,11 @@ describe 'Auth:', ->
|
|||||||
describe 'given a logged in user', ->
|
describe 'given a logged in user', ->
|
||||||
|
|
||||||
beforeEach (done) ->
|
beforeEach (done) ->
|
||||||
nock(config.baseUrl)
|
nock(config.remoteUrl)
|
||||||
.post('/login_', johnDoeFixture.credentials)
|
.post('/login_', johnDoeFixture.credentials)
|
||||||
.reply(200, johnDoeFixture.token)
|
.reply(200, johnDoeFixture.token)
|
||||||
|
|
||||||
nock(config.baseUrl)
|
nock(config.remoteUrl)
|
||||||
.post('/login_', janeDoeFixture.credentials)
|
.post('/login_', janeDoeFixture.credentials)
|
||||||
.reply(200, janeDoeFixture.token)
|
.reply(200, janeDoeFixture.token)
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@ path = require('path')
|
|||||||
module.exports =
|
module.exports =
|
||||||
|
|
||||||
# TODO: Should be configurable
|
# TODO: Should be configurable
|
||||||
baseUrl: 'https://staging.resin.io'
|
remoteUrl: 'https://staging.resin.io'
|
||||||
dataPrefix: path.join(process.env.HOME, '.resin')
|
dataPrefix: path.join(process.env.HOME, '.resin')
|
||||||
|
@ -6,7 +6,7 @@ token = require('../token/token')
|
|||||||
|
|
||||||
exports.request = (method = 'GET', url, json, callback) ->
|
exports.request = (method = 'GET', url, json, callback) ->
|
||||||
method = method.toUpperCase()
|
method = method.toUpperCase()
|
||||||
url = urljoin(config.baseUrl, url)
|
url = urljoin(config.remoteUrl, url)
|
||||||
|
|
||||||
async.waterfall [
|
async.waterfall [
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ token = require('../token/token')
|
|||||||
mock = require('../../tests/utils/mock')
|
mock = require('../../tests/utils/mock')
|
||||||
johnDoeFixture = require('../../tests/fixtures/johndoe.json')
|
johnDoeFixture = require('../../tests/fixtures/johndoe.json')
|
||||||
|
|
||||||
TEST_URI = config.baseUrl
|
TEST_URI = config.remoteUrl
|
||||||
|
|
||||||
URI =
|
URI =
|
||||||
ok: '/ok'
|
ok: '/ok'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user