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.
This commit is contained in:
@ -1,20 +1,41 @@
|
||||
require('../test_utils.js')()
|
||||
|
||||
var ctrl = require('../lib/core.js')
|
||||
var opts = { extra_args: [ '--quiet'] }
|
||||
|
||||
describe("Enable/Disable Commands", function() {
|
||||
before(startMaxScale)
|
||||
|
||||
it('disable with bad parameter', function() {
|
||||
return doCommand('disable log-priority bad-stuff')
|
||||
.should.be.rejected
|
||||
it('enable log-priority', function() {
|
||||
return verifyCommand('enable log-priority info', 'maxscale/logs')
|
||||
.then(function(res) {
|
||||
res.data.attributes.log_priorities.should.include('info')
|
||||
})
|
||||
})
|
||||
|
||||
it('enable with bad parameter', function() {
|
||||
it('disable log-priority', function() {
|
||||
return verifyCommand('disable log-priority info', 'maxscale/logs')
|
||||
.then(function(res) {
|
||||
res.data.attributes.log_priorities.should.not.include('info')
|
||||
})
|
||||
})
|
||||
|
||||
it('enable log-priority with bad parameter', function() {
|
||||
return doCommand('enable log-priority bad-stuff')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('disable log-priority with bad parameter', function() {
|
||||
return doCommand('disable log-priority bad-stuff')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('enable account', function() {
|
||||
return verifyCommand('enable account test', 'users/unix/test')
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('disable account', function() {
|
||||
return doCommand('disable account test')
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
after(stopMaxScale)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user