
If a monitor was created with an argument that was not a key-value type, a promise would be rejected outside of the main maxctrl function. Added a test case that covers this and fixed a few other test coverage problems that were present.
40 lines
765 B
JavaScript
40 lines
765 B
JavaScript
require('../test_utils.js')()
|
|
|
|
describe("Unknown Commands", function() {
|
|
before(startMaxScale)
|
|
|
|
var endpoints = [
|
|
'list',
|
|
'show',
|
|
'set',
|
|
'clear',
|
|
'enable',
|
|
'disable',
|
|
'create',
|
|
'destroy',
|
|
'link',
|
|
'unlink',
|
|
'start',
|
|
'stop',
|
|
'alter',
|
|
'rotate',
|
|
'call',
|
|
'cluster',
|
|
'drain'
|
|
]
|
|
|
|
endpoints.forEach(function (i) {
|
|
it('unknown ' + i + ' command', function() {
|
|
return doCommand(i + ' something')
|
|
.should.be.rejected
|
|
})
|
|
})
|
|
|
|
it('generic unknown command', function() {
|
|
return doCommand('something')
|
|
.should.be.rejected
|
|
})
|
|
|
|
after(stopMaxScale)
|
|
});
|