Update test configuration files
Updated the REST API and MaxCtrl configuration files with new object names. Updated tests with new object names.
This commit is contained in:
@ -21,14 +21,14 @@ describe("Alter Commands", function() {
|
||||
})
|
||||
|
||||
it('alter monitor', function() {
|
||||
return verifyCommand('alter monitor MySQL-Monitor monitor_interval 1000', 'monitors/MySQL-Monitor')
|
||||
return verifyCommand('alter monitor MariaDB-Monitor monitor_interval 1000', 'monitors/MariaDB-Monitor')
|
||||
.then(function(res) {
|
||||
res.data.attributes.parameters.monitor_interval.should.equal(1000)
|
||||
})
|
||||
})
|
||||
|
||||
it('will not alter monitor with bad parameters', function() {
|
||||
return doCommand('alter monitor MySQL-Monitor monitor_interval not-a-number')
|
||||
return doCommand('alter monitor MariaDB-Monitor monitor_interval not-a-number')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
|
@ -185,9 +185,9 @@ describe('Cluster Sync', function() {
|
||||
})
|
||||
|
||||
it('sync after monitor alteration', function() {
|
||||
return doCommand('alter monitor MySQL-Monitor monitor_interval 12345 --hosts ' + secondary_host)
|
||||
return doCommand('alter monitor MariaDB-Monitor monitor_interval 12345 --hosts ' + secondary_host)
|
||||
.then(() => verifyCommand('cluster sync ' + secondary_host + ' --hosts ' + primary_host,
|
||||
'monitors/MySQL-Monitor'))
|
||||
'monitors/MariaDB-Monitor'))
|
||||
.then(function(res) {
|
||||
res.data.attributes.parameters.monitor_interval.should.equal(12345)
|
||||
})
|
||||
|
@ -39,7 +39,7 @@ describe("Create/Destroy Commands", function() {
|
||||
})
|
||||
|
||||
it('create monitor with options', function() {
|
||||
return doCommand('unlink monitor MySQL-Monitor server4')
|
||||
return doCommand('unlink monitor MariaDB-Monitor server4')
|
||||
.then(() => verifyCommand('create monitor my-monitor mysqlmon --servers server4 --monitor-user maxuser --monitor-password maxpwd',
|
||||
'monitors/my-monitor'))
|
||||
.then(function(res) {
|
||||
@ -84,12 +84,12 @@ describe("Create/Destroy Commands", function() {
|
||||
})
|
||||
|
||||
it('create server for service and monitor', function() {
|
||||
return verifyCommand('create server server6 127.0.0.1 3005 --services RW-Split-Router --monitors MySQL-Monitor',
|
||||
return verifyCommand('create server server6 127.0.0.1 3005 --services RW-Split-Router --monitors MariaDB-Monitor',
|
||||
'servers/server6')
|
||||
.then(function(res) {
|
||||
res.data.relationships.services.data[0].id.should.equal("RW-Split-Router")
|
||||
res.data.relationships.services.data.length.should.equal(1)
|
||||
res.data.relationships.monitors.data[0].id.should.equal("MySQL-Monitor")
|
||||
res.data.relationships.monitors.data[0].id.should.equal("MariaDB-Monitor")
|
||||
res.data.relationships.monitors.data.length.should.equal(1)
|
||||
})
|
||||
})
|
||||
|
@ -12,7 +12,7 @@ var tests = [
|
||||
'list commands',
|
||||
'show server server1',
|
||||
'show service RW-Split-Router',
|
||||
'show monitor MySQL-Monitor',
|
||||
'show monitor MariaDB-Monitor',
|
||||
'show session 5',
|
||||
'show filter Hint',
|
||||
'show module readwritesplit',
|
||||
|
@ -25,8 +25,8 @@ describe("Link/Unlink Commands", function() {
|
||||
})
|
||||
|
||||
it('unlink servers from a monitor', function() {
|
||||
return verifyCommand('unlink monitor MySQL-Monitor server2 server3 server4',
|
||||
'monitors/MySQL-Monitor')
|
||||
return verifyCommand('unlink monitor MariaDB-Monitor server2 server3 server4',
|
||||
'monitors/MariaDB-Monitor')
|
||||
.then(function(res) {
|
||||
res.data.relationships.servers.data.length.should.equal(1)
|
||||
res.data.relationships.servers.data[0].id.should.equal("server1")
|
||||
@ -34,8 +34,8 @@ describe("Link/Unlink Commands", function() {
|
||||
})
|
||||
|
||||
it('link servers to a monitor', function() {
|
||||
return verifyCommand('link monitor MySQL-Monitor server1 server2 server3 server4',
|
||||
'monitors/MySQL-Monitor')
|
||||
return verifyCommand('link monitor MariaDB-Monitor server1 server2 server3 server4',
|
||||
'monitors/MariaDB-Monitor')
|
||||
.then(function(res) {
|
||||
res.data.relationships.servers.data.length.should.equal(4)
|
||||
res.data.relationships.servers.data[0].id.should.equal("server1")
|
||||
|
@ -18,14 +18,14 @@ describe('Start/Stop Commands', function() {
|
||||
})
|
||||
|
||||
it('stop monitor', function() {
|
||||
return verifyCommand('stop monitor MySQL-Monitor', 'monitors/MySQL-Monitor')
|
||||
return verifyCommand('stop monitor MariaDB-Monitor', 'monitors/MariaDB-Monitor')
|
||||
.then(function(res) {
|
||||
res.data.attributes.state.should.equal('Stopped')
|
||||
})
|
||||
})
|
||||
|
||||
it('start monitor', function() {
|
||||
return verifyCommand('start monitor MySQL-Monitor', 'monitors/MySQL-Monitor')
|
||||
return verifyCommand('start monitor MariaDB-Monitor', 'monitors/MariaDB-Monitor')
|
||||
.then(function(res) {
|
||||
res.data.attributes.state.should.equal('Running')
|
||||
})
|
||||
|
@ -4,7 +4,7 @@ describe("Set/Clear Commands", function() {
|
||||
before(function() {
|
||||
return startMaxScale()
|
||||
.then(function() {
|
||||
return request.put(host + 'monitors/MySQL-Monitor/stop')
|
||||
return request.put(host + 'monitors/MariaDB-Monitor/stop')
|
||||
})
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user