buster-ci should pass the server url to buster test cli
Closed this issue · 1 comments
GCheung55 commented
buster-ci
config allows for a server object definition, which contains host and port.
Unfortunately, the port is changed from the default of 1111, it doesn't get passed to buster-test-cli
.
The painful way to get around this is to identify the server as an argv AND a config option of buster-ci
:
module.exports = {
server: {
host: 'localhost',
port: 1212
}
}
$ buster-ci --server http://localhost:1212
We'd have to determine which one has higher priority, config file option or argv. I also suggest that we use the url
module to parse a string and format an object.
var url = require('url')
var server = {
hostname: 'localhost',
port: 1111,
protocol: 'http'
}
// returns http://localhost:1111
url.format(server)
/* returns
{ protocol: 'http:',
slashes: true,
auth: null,
host: 'localhost:1111',
port: '1111',
hostname: 'localhost',
hash: null,
search: null,
query: null,
pathname: '/',
path: '/',
href: 'http://localhost:1111/' }
*/
url.parse('http://localhost:1111')
dwittner commented
Fixed in version 0.2.1 of buster-ci.