MXS-1300: Fix deletion of monitors
The monitors should only be reused if they have the same name and they use the same module. This way the only difference is in configuration. Fixed MaxCtrl detection of bad options and altered monitor creation test to expect correct results. Also improved some of the error messages.
This commit is contained in:
@ -19,6 +19,8 @@ const maxctrl_version = '1.0.0';
|
||||
program
|
||||
.version(maxctrl_version)
|
||||
.strict()
|
||||
.exitProcess(false)
|
||||
.showHelpOnFail(false)
|
||||
.group(['u', 'p', 'h', 's', 't', 'q', 'tsv'], 'Global Options:')
|
||||
.option('u', {
|
||||
alias:'user',
|
||||
@ -96,6 +98,10 @@ module.exports.execute = function(argv, opts) {
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
program
|
||||
.parse(argv, {resolve: resolve, reject: reject})
|
||||
.parse(argv, {resolve: resolve, reject: reject}, function(err, argv, output) {
|
||||
if (err) {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user