1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

remove unnecessary options from api unit. Improve error messages... etc etc

This commit is contained in:
Vishal Banthia 2015-12-04 16:42:11 +09:00
parent 221bc78e49
commit 536e469e6f
5 changed files with 21 additions and 29 deletions

View file

@ -871,22 +871,15 @@ program
, 'secret (or $SECRET)'
, String
, process.env.SECRET)
.option('-a, --auth-url <url>'
, 'URL to auth client'
, String)
.action(function(options) {
if (!options.secret) {
this.missingArgument('--secret')
}
if (!options.authUrl) {
this.missingArgument('--auth-url')
}
require('./units/api')({
port: options.port
, ssid: options.ssid
, secret: options.secret
, authUrl: options.authUrl
})
})
@ -1335,12 +1328,6 @@ program
'api'
, '--port', options.apiPort
, '--secret', options.authSecret
, '--auth-url', options.authUrl || util.format(
'http://%s:%d/auth/%s/'
, options.publicIp
, options.poorxyPort
, ({oauth2: 'oauth'}[options.authType]) || options.authType
)
])
// websocket
, procutil.fork(__filename, [