MXS-1300: Test calling of module commands via MaxCtrl
The calling of module commands is tested by using the qlafilter log command.
This commit is contained in:
24
maxctrl/test/call.js
Normal file
24
maxctrl/test/call.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
require('../test_utils.js')()
|
||||||
|
|
||||||
|
describe("Module Commands", function() {
|
||||||
|
before(startMaxScale)
|
||||||
|
|
||||||
|
it('call command', function() {
|
||||||
|
return doCommand('call command qlafilter log QLA')
|
||||||
|
.then(function(output) {
|
||||||
|
JSON.parse(output).meta.should.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('call command with missing parameters', function() {
|
||||||
|
return doCommand('call command qlafilter log')
|
||||||
|
.should.be.rejected
|
||||||
|
})
|
||||||
|
|
||||||
|
it('call command with too many parameters', function() {
|
||||||
|
return doCommand('call command qlafilter log QLA too many arguments for this command')
|
||||||
|
.should.be.rejected
|
||||||
|
})
|
||||||
|
|
||||||
|
after(stopMaxScale)
|
||||||
|
});
|
@ -49,6 +49,7 @@ router_options=master
|
|||||||
servers=server1
|
servers=server1
|
||||||
user=maxuser
|
user=maxuser
|
||||||
passwd=maxpwd
|
passwd=maxpwd
|
||||||
|
filters=QLA
|
||||||
|
|
||||||
[Hint]
|
[Hint]
|
||||||
type=filter
|
type=filter
|
||||||
@ -69,6 +70,14 @@ type=filter
|
|||||||
module=tee
|
module=tee
|
||||||
service=RW Split Hint Router
|
service=RW Split Hint Router
|
||||||
|
|
||||||
|
[QLA]
|
||||||
|
type=filter
|
||||||
|
module=qlafilter
|
||||||
|
log_type=unified
|
||||||
|
append=false
|
||||||
|
flush=true
|
||||||
|
filebase=/tmp/qla.log
|
||||||
|
|
||||||
[CLI]
|
[CLI]
|
||||||
type=service
|
type=service
|
||||||
router=cli
|
router=cli
|
||||||
|
Reference in New Issue
Block a user