Files
MaxScale/maxctrl/test/diagnostics.js
Markus Mäkelä 9e688772cc MXS-1300: Make the MaxCtrl core a Node.js module
The core is now a module that is loaded by the command line client. This
allows the core library to be reused for testing.
2017-07-18 11:37:18 +03:00

36 lines
835 B
JavaScript

require('../test_utils.js')()
describe("Diagnostic commands", function() {
before(startMaxScale)
var ctrl = require('maxctrl-core')
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)
});