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:
parent
f204650bbb
commit
ccebf38bc0
@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -52,8 +52,8 @@ describe("Monitor Relationships", function() {
|
||||
relationships: {
|
||||
servers: null
|
||||
}}}
|
||||
return request.patch(base_url + "/monitors/MySQL-Monitor", {json: mon})
|
||||
.then(() => request.get(base_url + "/monitors/MySQL-Monitor", { json: true }))
|
||||
return request.patch(base_url + "/monitors/MariaDB-Monitor", {json: mon})
|
||||
.then(() => request.get(base_url + "/monitors/MariaDB-Monitor", { json: true }))
|
||||
.then((res) => {
|
||||
res.data.relationships.should.not.have.keys("servers")
|
||||
})
|
||||
@ -93,9 +93,9 @@ describe("Monitor Relationships", function() {
|
||||
{id: "server3", type: "servers"},
|
||||
{id: "server4", type: "servers"},
|
||||
]}
|
||||
return request.patch(base_url + "/monitors/MySQL-Monitor", {json: mon})
|
||||
return request.patch(base_url + "/monitors/MariaDB-Monitor", {json: mon})
|
||||
})
|
||||
.then(() => request.get(base_url + "/monitors/MySQL-Monitor", { json: true }))
|
||||
.then(() => request.get(base_url + "/monitors/MariaDB-Monitor", { json: true }))
|
||||
.then((res) => {
|
||||
res.data.relationships.servers.data.should.have.lengthOf(4)
|
||||
})
|
||||
@ -111,9 +111,9 @@ describe("Monitor Relationships", function() {
|
||||
{ id: "server1", type: "servers" }
|
||||
]}
|
||||
|
||||
return request.patch(base_url + "/monitors/MySQL-Monitor/relationships/servers", {json: old})
|
||||
return request.patch(base_url + "/monitors/MariaDB-Monitor/relationships/servers", {json: old})
|
||||
.then(() => request.patch(base_url + "/monitors/" + monitor.data.id + "/relationships/servers", {json: created}))
|
||||
.then(() => request.get(base_url + "/monitors/MySQL-Monitor", { json: true }))
|
||||
.then(() => request.get(base_url + "/monitors/MariaDB-Monitor", { json: true }))
|
||||
.then((res) => {
|
||||
res.data.relationships.servers.data.should.have.lengthOf(3)
|
||||
})
|
||||
@ -138,8 +138,8 @@ describe("Monitor Relationships", function() {
|
||||
]}
|
||||
|
||||
return request.patch(base_url + "/monitors/" + monitor.data.id + "/relationships/servers", {json: {data: []}})
|
||||
.then(() => request.patch(base_url + "/monitors/MySQL-Monitor/relationships/servers", {json: old}))
|
||||
.then(() => request.get(base_url + "/monitors/MySQL-Monitor", { json: true }))
|
||||
.then(() => request.patch(base_url + "/monitors/MariaDB-Monitor/relationships/servers", {json: old}))
|
||||
.then(() => request.get(base_url + "/monitors/MariaDB-Monitor", { json: true }))
|
||||
.then((res) => {
|
||||
res.data.relationships.servers.data.should.have.lengthOf(4)
|
||||
})
|
||||
@ -161,9 +161,9 @@ describe("Monitor Actions", function() {
|
||||
before(startMaxScale)
|
||||
|
||||
it("stop monitor", function() {
|
||||
return request.put(base_url + "/monitors/MySQL-Monitor/stop")
|
||||
return request.put(base_url + "/monitors/MariaDB-Monitor/stop")
|
||||
.then(function() {
|
||||
return request.get(base_url + "/monitors/MySQL-Monitor")
|
||||
return request.get(base_url + "/monitors/MariaDB-Monitor")
|
||||
})
|
||||
.then(function(resp) {
|
||||
var mon = JSON.parse(resp)
|
||||
@ -172,9 +172,9 @@ describe("Monitor Actions", function() {
|
||||
});
|
||||
|
||||
it("start monitor", function() {
|
||||
return request.put(base_url + "/monitors/MySQL-Monitor/start")
|
||||
return request.put(base_url + "/monitors/MariaDB-Monitor/start")
|
||||
.then(function() {
|
||||
return request.get(base_url + "/monitors/MySQL-Monitor")
|
||||
return request.get(base_url + "/monitors/MariaDB-Monitor")
|
||||
})
|
||||
.then(function(resp) {
|
||||
var mon = JSON.parse(resp)
|
||||
@ -199,9 +199,9 @@ describe("Monitor Regressions", function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
return request.patch(base_url + "/monitors/MySQL-Monitor", {json: b})
|
||||
return request.patch(base_url + "/monitors/MariaDB-Monitor", {json: b})
|
||||
.then(function() {
|
||||
return request.get(base_url + "/monitors/MySQL-Monitor")
|
||||
return request.get(base_url + "/monitors/MariaDB-Monitor")
|
||||
})
|
||||
.then(function(resp) {
|
||||
var mon = JSON.parse(resp)
|
||||
|
@ -42,7 +42,7 @@ describe("Individual Resources", function() {
|
||||
"/servers/server2",
|
||||
"/services/RW-Split-Router",
|
||||
"/services/RW-Split-Router/listeners",
|
||||
"/monitors/MySQL-Monitor",
|
||||
"/monitors/MariaDB-Monitor",
|
||||
"/filters/Hint",
|
||||
"/sessions/1",
|
||||
"/maxscale/",
|
||||
@ -83,7 +83,7 @@ describe("Resource Self Links", function() {
|
||||
"/services/RW-Split-Router",
|
||||
"/services/RW-Split-Router/listeners",
|
||||
"/services/RW-Split-Router/listeners/RW-Split-Listener",
|
||||
"/monitors/MySQL-Monitor",
|
||||
"/monitors/MariaDB-Monitor",
|
||||
"/filters/Hint",
|
||||
"/sessions/1",
|
||||
"/maxscale/",
|
||||
|
@ -8,7 +8,7 @@ var server = {
|
||||
parameters: {
|
||||
port: 3003,
|
||||
address: "127.0.0.1",
|
||||
protocol: "MySQLBackend"
|
||||
protocol: "MariaDBBackend"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -71,11 +71,11 @@ describe("Server Relationships", function() {
|
||||
|
||||
it("add relationships with `relationships` endpoint", function() {
|
||||
return request.patch(base_url + "/servers/" + rel_server.data.id + "/relationships/monitors",
|
||||
{ json: { data: [ { "id": "MySQL-Monitor", "type": "monitors" }]}})
|
||||
{ json: { data: [ { "id": "MariaDB-Monitor", "type": "monitors" }]}})
|
||||
.then(() => request.get(base_url + "/servers/" + rel_server.data.id, {json: true}))
|
||||
.then((res) => {
|
||||
res.data.relationships.monitors.data.should.have.lengthOf(1)
|
||||
.that.has.deep.include({ "id": "MySQL-Monitor", "type": "monitors" })
|
||||
.that.has.deep.include({ "id": "MariaDB-Monitor", "type": "monitors" })
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -98,7 +98,7 @@ describe("Service", function() {
|
||||
"attributes": {
|
||||
"parameters": {
|
||||
"port": 4012,
|
||||
"protocol": "MySQLClient",
|
||||
"protocol": "MariaDBClient",
|
||||
"authenticator": "MySQLAuth",
|
||||
"address": "127.0.0.1"
|
||||
}
|
||||
|
@ -9,15 +9,15 @@ language=@CMAKE_INSTALL_PREFIX@/lib/maxscale/
|
||||
piddir=@CMAKE_INSTALL_PREFIX@/run/maxscale/
|
||||
admin_auth=false
|
||||
|
||||
[MySQL Monitor]
|
||||
[MariaDB-Monitor]
|
||||
type=monitor
|
||||
module=mysqlmon
|
||||
module=mariadbmon
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxuser
|
||||
passwd=maxpwd
|
||||
monitor_interval=10000
|
||||
|
||||
[RW Split Router]
|
||||
[RW-Split-Router]
|
||||
type=service
|
||||
router=readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
@ -25,7 +25,7 @@ user=maxuser
|
||||
passwd=maxpwd
|
||||
max_slave_connections=100%
|
||||
|
||||
[SchemaRouter Router]
|
||||
[SchemaRouter-Router]
|
||||
type=service
|
||||
router=schemarouter
|
||||
servers=server1,server2,server3,server4
|
||||
@ -33,7 +33,7 @@ user=maxuser
|
||||
passwd=maxpwd
|
||||
auth_all_servers=1
|
||||
|
||||
[RW Split Hint Router]
|
||||
[RW-Split-Hint-Router]
|
||||
type=service
|
||||
router=readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
@ -42,7 +42,7 @@ passwd=maxpwd
|
||||
max_slave_connections=100%
|
||||
filters=Hint
|
||||
|
||||
[Read Connection Router]
|
||||
[Read-Connection-Router]
|
||||
type=service
|
||||
router=readconnroute
|
||||
router_options=master
|
||||
@ -58,17 +58,17 @@ module=hintfilter
|
||||
[recurse3]
|
||||
type=filter
|
||||
module=tee
|
||||
service=RW Split Router
|
||||
service=RW-Split-Router
|
||||
|
||||
[recurse2]
|
||||
type=filter
|
||||
module=tee
|
||||
service=Read Connection Router
|
||||
service=Read-Connection-Router
|
||||
|
||||
[recurse1]
|
||||
type=filter
|
||||
module=tee
|
||||
service=RW Split Hint Router
|
||||
service=RW-Split-Hint-Router
|
||||
|
||||
[QLA]
|
||||
type=filter
|
||||
@ -82,31 +82,31 @@ filebase=/tmp/qla.log
|
||||
type=service
|
||||
router=cli
|
||||
|
||||
[Read Connection Listener]
|
||||
[Read-Connection-Listener]
|
||||
type=listener
|
||||
service=Read Connection Router
|
||||
protocol=MySQLClient
|
||||
service=Read-Connection-Router
|
||||
protocol=MariaDBClient
|
||||
port=4008
|
||||
|
||||
[RW Split Listener]
|
||||
[RW-Split-Listener]
|
||||
type=listener
|
||||
service=RW Split Router
|
||||
protocol=MySQLClient
|
||||
service=RW-Split-Router
|
||||
protocol=MariaDBClient
|
||||
port=4006
|
||||
|
||||
[SchemaRouter Listener]
|
||||
[SchemaRouter-Listener]
|
||||
type=listener
|
||||
service=SchemaRouter Router
|
||||
protocol=MySQLClient
|
||||
service=SchemaRouter-Router
|
||||
protocol=MariaDBClient
|
||||
port=4010
|
||||
|
||||
[RW Split Hint Listener]
|
||||
[RW-Split-Hint-Listener]
|
||||
type=listener
|
||||
service=RW Split Hint Router
|
||||
protocol=MySQLClient
|
||||
service=RW-Split-Hint-Router
|
||||
protocol=MariaDBClient
|
||||
port=4009
|
||||
|
||||
[CLI Listener]
|
||||
[CLI-Listener]
|
||||
type=listener
|
||||
service=CLI
|
||||
protocol=maxscaled
|
||||
@ -116,22 +116,22 @@ socket=default
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3000
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[server2]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3001
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[server3]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3002
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[server4]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3003
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
@ -11,15 +11,15 @@ config_persistdir=@CMAKE_INSTALL_PREFIX@/secondary/lib/maxscale/
|
||||
admin_auth=false
|
||||
admin_port=8990
|
||||
|
||||
[MySQL Monitor]
|
||||
[MariaDB-Monitor]
|
||||
type=monitor
|
||||
module=mysqlmon
|
||||
module=mariadbmon
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxuser
|
||||
passwd=maxpwd
|
||||
monitor_interval=10000
|
||||
|
||||
[RW Split Router]
|
||||
[RW-Split-Router]
|
||||
type=service
|
||||
router=readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
@ -27,7 +27,7 @@ user=maxuser
|
||||
passwd=maxpwd
|
||||
max_slave_connections=100%
|
||||
|
||||
[SchemaRouter Router]
|
||||
[SchemaRouter-Router]
|
||||
type=service
|
||||
router=schemarouter
|
||||
servers=server1,server2,server3,server4
|
||||
@ -35,7 +35,7 @@ user=maxuser
|
||||
passwd=maxpwd
|
||||
auth_all_servers=1
|
||||
|
||||
[RW Split Hint Router]
|
||||
[RW-Split-Hint-Router]
|
||||
type=service
|
||||
router=readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
@ -44,7 +44,7 @@ passwd=maxpwd
|
||||
max_slave_connections=100%
|
||||
filters=Hint
|
||||
|
||||
[Read Connection Router]
|
||||
[Read-Connection-Router]
|
||||
type=service
|
||||
router=readconnroute
|
||||
router_options=master
|
||||
@ -59,47 +59,47 @@ module=hintfilter
|
||||
[recurse3]
|
||||
type=filter
|
||||
module=tee
|
||||
service=RW Split Router
|
||||
service=RW-Split-Router
|
||||
|
||||
[recurse2]
|
||||
type=filter
|
||||
module=tee
|
||||
service=Read Connection Router
|
||||
service=Read-Connection-Router
|
||||
|
||||
[recurse1]
|
||||
type=filter
|
||||
module=tee
|
||||
service=RW Split Hint Router
|
||||
service=RW-Split-Hint-Router
|
||||
|
||||
[CLI]
|
||||
type=service
|
||||
router=cli
|
||||
|
||||
[Read Connection Listener]
|
||||
[Read-Connection-Listener]
|
||||
type=listener
|
||||
service=Read Connection Router
|
||||
protocol=MySQLClient
|
||||
service=Read-Connection-Router
|
||||
protocol=MariaDBClient
|
||||
port=5008
|
||||
|
||||
[RW Split Listener]
|
||||
[RW-Split-Listener]
|
||||
type=listener
|
||||
service=RW Split Router
|
||||
protocol=MySQLClient
|
||||
service=RW-Split-Router
|
||||
protocol=MariaDBClient
|
||||
port=5006
|
||||
|
||||
[SchemaRouter Listener]
|
||||
[SchemaRouter-Listener]
|
||||
type=listener
|
||||
service=SchemaRouter Router
|
||||
protocol=MySQLClient
|
||||
service=SchemaRouter-Router
|
||||
protocol=MariaDBClient
|
||||
port=5010
|
||||
|
||||
[RW Split Hint Listener]
|
||||
[RW-Split-Hint-Listener]
|
||||
type=listener
|
||||
service=RW Split Hint Router
|
||||
protocol=MySQLClient
|
||||
service=RW-Split-Hint-Router
|
||||
protocol=MariaDBClient
|
||||
port=5009
|
||||
|
||||
[CLI Listener]
|
||||
[CLI-Listener]
|
||||
type=listener
|
||||
service=CLI
|
||||
protocol=maxscaled
|
||||
@ -109,22 +109,22 @@ socket=/tmp/maxadmin2.sock
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3000
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[server2]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3001
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[server3]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3002
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[server4]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
port=3003
|
||||
protocol=MySQLBackend
|
||||
protocol=MariaDBBackend
|
||||
|
Loading…
x
Reference in New Issue
Block a user