Add MaxCtrl test for start/stop maxscale
Added the missing test case for starting and stopping MaxScale.
This commit is contained in:
@ -1,33 +1,51 @@
|
|||||||
require('../test_utils.js')()
|
require('../test_utils.js')()
|
||||||
|
|
||||||
describe("Start/Stop Commands", function() {
|
describe('Start/Stop Commands', function() {
|
||||||
before(startMaxScale)
|
before(startMaxScale)
|
||||||
|
|
||||||
it('stop service', function() {
|
it('stop service', function() {
|
||||||
return verifyCommand('stop service Read-Connection-Router', 'services/Read-Connection-Router')
|
return verifyCommand('stop service Read-Connection-Router', 'services/Read-Connection-Router')
|
||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
res.data.attributes.state.should.equal("Stopped")
|
res.data.attributes.state.should.equal('Stopped')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('start service', function() {
|
it('start service', function() {
|
||||||
return verifyCommand('start service Read-Connection-Router', 'services/Read-Connection-Router')
|
return verifyCommand('start service Read-Connection-Router', 'services/Read-Connection-Router')
|
||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
res.data.attributes.state.should.equal("Started")
|
res.data.attributes.state.should.equal('Started')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('stop monitor', function() {
|
it('stop monitor', function() {
|
||||||
return verifyCommand('stop monitor MySQL-Monitor', 'monitors/MySQL-Monitor')
|
return verifyCommand('stop monitor MySQL-Monitor', 'monitors/MySQL-Monitor')
|
||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
res.data.attributes.state.should.equal("Stopped")
|
res.data.attributes.state.should.equal('Stopped')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('start monitor', function() {
|
it('start monitor', function() {
|
||||||
return verifyCommand('start monitor MySQL-Monitor', 'monitors/MySQL-Monitor')
|
return verifyCommand('start monitor MySQL-Monitor', 'monitors/MySQL-Monitor')
|
||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
res.data.attributes.state.should.equal("Running")
|
res.data.attributes.state.should.equal('Running')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('stop maxscale', function() {
|
||||||
|
return verifyCommand('stop maxscale', 'services')
|
||||||
|
.then(function(res) {
|
||||||
|
res.data.forEach((i) => {
|
||||||
|
i.attributes.state.should.equal('Stopped')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('start maxscale', function() {
|
||||||
|
return verifyCommand('start maxscale', 'services')
|
||||||
|
.then(function(res) {
|
||||||
|
res.data.forEach((i) => {
|
||||||
|
i.attributes.state.should.equal('Started')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user