Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

buster-ci should pass the server url to buster test cli #448

Closed
GCheung55 opened this issue Jan 29, 2015 · 1 comment
Closed

buster-ci should pass the server url to buster test cli #448

GCheung55 opened this issue Jan 29, 2015 · 1 comment

Comments

@GCheung55
Copy link
Contributor

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')
@dkl-ppi
Copy link
Member

dkl-ppi commented Mar 16, 2015

Fixed in version 0.2.1 of buster-ci.

@dkl-ppi dkl-ppi closed this as completed Mar 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants