
The tests are now sorted by command type. This allows for more consistent test creation as tests can be done per source code file instead of per object type. Added helper functions for common testing operations. The two main ones are doCommand, which executes a MaxCtrl command and returns a result, and verifyCommand, that executes a command and verifies the result via the REST API.
31 lines
573 B
JavaScript
31 lines
573 B
JavaScript
require('../test_utils.js')()
|
|
|
|
describe("Unknown Commands", function() {
|
|
before(startMaxScale)
|
|
|
|
var endpoints = [
|
|
'list',
|
|
'show',
|
|
'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
|
|
})
|
|
})
|
|
|
|
after(stopMaxScale)
|
|
});
|