MaxScale/maxctrl/test/unknown.js
Markus Mäkelä c9f3d014d6 MXS-1300: Improve test coverage
The tests now cover 100% of all source files with the exception of the
call.js and common.js source files.
2017-07-23 08:21:00 +03:00

38 lines
730 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',
]
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)
});