Merge branch '2.3' into develop
This commit is contained in:
27
maxctrl/test/classify.js
Normal file
27
maxctrl/test/classify.js
Normal file
@ -0,0 +1,27 @@
|
||||
require('../test_utils.js')()
|
||||
|
||||
describe("Classify Commands", function() {
|
||||
before(startMaxScale)
|
||||
|
||||
it('classifies query', function() {
|
||||
return doCommand('--tsv classify SELECT\t1')
|
||||
.should.eventually.match(/QC_QUERY_PARSED/)
|
||||
})
|
||||
|
||||
it('classifies query with function', function() {
|
||||
return doCommand('--tsv classify SELECT\tspecial_function("hello",5)')
|
||||
.should.eventually.match(/special_function/)
|
||||
})
|
||||
|
||||
it('classifies invalid query', function() {
|
||||
return doCommand('--tsv classify This-should-fail')
|
||||
.should.eventually.match(/QC_QUERY_INVALID/)
|
||||
})
|
||||
|
||||
it('rejects no query', function() {
|
||||
return doCommand('classify')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
after(stopMaxScale)
|
||||
});
|
@ -22,6 +22,20 @@ describe("Set/Clear Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('force maintenance mode', function() {
|
||||
return verifyCommand('set server server1 maintenance --force', 'servers/server1')
|
||||
.then(function(res) {
|
||||
res.data.attributes.state.should.match(/Maintenance/)
|
||||
})
|
||||
})
|
||||
|
||||
it('clear maintenance mode', function() {
|
||||
return verifyCommand('clear server server1 maintenance', 'servers/server1')
|
||||
.then(function(res) {
|
||||
res.data.attributes.state.should.not.match(/Maintenance/)
|
||||
})
|
||||
})
|
||||
|
||||
it('reject set incorrect state', function() {
|
||||
return doCommand('set server server2 something')
|
||||
.should.be.rejected
|
||||
|
Reference in New Issue
Block a user