Files
MaxScale/maxctrl/test/diagnostics.js
Markus Mäkelä 738dc48df7 MXS-1300: Add basic maxctrl tests
Added basic tests for maxctrl. They simply test that the diagnostic
commands work.
2017-07-18 11:37:18 +03:00

36 lines
833 B
JavaScript

require('../test_utils.js')()
describe("Diagnostic commands", function() {
before(startMaxScale)
var ctrl = require('../core.js')
var tests = [
'list servers',
'list services',
'list monitors',
'list sessions',
'list filters',
'list modules',
'list users',
'list commands',
'show server server1',
'show service RW-Split-Router',
'show monitor MySQL-Monitor',
'show session 5',
'show filter Hint',
'show module readwritesplit',
'show maxscale',
]
tests.forEach(function(i) {
it(i, function() {
return ctrl.execute(i.split(' '), {
extra_args: [ '--quiet']
})
.should.be.fulfilled
});
})
after(stopMaxScale)
});