MXS-1300: Add basic maxctrl tests

Added basic tests for maxctrl. They simply test that the diagnostic
commands work.
This commit is contained in:
Markus Mäkelä
2017-07-14 16:39:44 +03:00
parent d938dcc701
commit 738dc48df7
5 changed files with 76 additions and 2 deletions

View File

@ -0,0 +1,35 @@
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)
});