mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-29 15:44:26 +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', ->
|
||||
|
||||
beforeEach ->
|
||||
nock(config.baseUrl)
|
||||
nock(config.remoteUrl)
|
||||
.post('/login_', johnDoeFixture.credentials)
|
||||
.reply(200, johnDoeFixture.token)
|
||||
|
||||
@ -62,7 +62,7 @@ describe 'Auth:', ->
|
||||
describe 'given invalid credentials', ->
|
||||
|
||||
beforeEach ->
|
||||
nock(config.baseUrl)
|
||||
nock(config.remoteUrl)
|
||||
.post('/login_')
|
||||
.reply(401)
|
||||
|
||||
@ -87,11 +87,11 @@ describe 'Auth:', ->
|
||||
describe 'given a logged in user', ->
|
||||
|
||||
beforeEach (done) ->
|
||||
nock(config.baseUrl)
|
||||
nock(config.remoteUrl)
|
||||
.post('/login_', johnDoeFixture.credentials)
|
||||
.reply(200, johnDoeFixture.token)
|
||||
|
||||
nock(config.baseUrl)
|
||||
nock(config.remoteUrl)
|
||||
.post('/login_', janeDoeFixture.credentials)
|
||||
.reply(200, janeDoeFixture.token)
|
||||
|
||||
|
@ -3,5 +3,5 @@ path = require('path')
|
||||
module.exports =
|
||||
|
||||
# TODO: Should be configurable
|
||||
baseUrl: 'https://staging.resin.io'
|
||||
remoteUrl: 'https://staging.resin.io'
|
||||
dataPrefix: path.join(process.env.HOME, '.resin')
|
||||
|
@ -6,7 +6,7 @@ token = require('../token/token')
|
||||
|
||||
exports.request = (method = 'GET', url, json, callback) ->
|
||||
method = method.toUpperCase()
|
||||
url = urljoin(config.baseUrl, url)
|
||||
url = urljoin(config.remoteUrl, url)
|
||||
|
||||
async.waterfall [
|
||||
|
||||
|
@ -6,7 +6,7 @@ token = require('../token/token')
|
||||
mock = require('../../tests/utils/mock')
|
||||
johnDoeFixture = require('../../tests/fixtures/johndoe.json')
|
||||
|
||||
TEST_URI = config.baseUrl
|
||||
TEST_URI = config.remoteUrl
|
||||
|
||||
URI =
|
||||
ok: '/ok'
|
||||
|
Loading…
x
Reference in New Issue
Block a user