From ccebf38bc0ea0949c67b564005eb574293a7c6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 19 Jan 2018 09:19:32 +0200 Subject: [PATCH] Update test configuration files Updated the REST API and MaxCtrl configuration files with new object names. Updated tests with new object names. --- maxctrl/test/alter.js | 4 +- maxctrl/test/cluster.js | 4 +- maxctrl/test/createdestroy.js | 6 +-- maxctrl/test/diagnostics.js | 2 +- maxctrl/test/link.js | 8 +-- maxctrl/test/startstop.js | 4 +- maxctrl/test/states.js | 2 +- server/core/test/rest-api/test/monitor.js | 28 +++++----- .../test/rest-api/test/schema_validation.js | 4 +- server/core/test/rest-api/test/server.js | 6 +-- server/core/test/rest-api/test/service.js | 2 +- test/maxscale_test.cnf | 52 +++++++++---------- test/maxscale_test_secondary.cnf | 52 +++++++++---------- 13 files changed, 87 insertions(+), 87 deletions(-) diff --git a/maxctrl/test/alter.js b/maxctrl/test/alter.js index 5e551afb6..2114c11e8 100644 --- a/maxctrl/test/alter.js +++ b/maxctrl/test/alter.js @@ -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 }) diff --git a/maxctrl/test/cluster.js b/maxctrl/test/cluster.js index 21dd4f8b1..94fe67045 100644 --- a/maxctrl/test/cluster.js +++ b/maxctrl/test/cluster.js @@ -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) }) diff --git a/maxctrl/test/createdestroy.js b/maxctrl/test/createdestroy.js index 54c8e67c8..b2f3bcde2 100644 --- a/maxctrl/test/createdestroy.js +++ b/maxctrl/test/createdestroy.js @@ -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) }) }) diff --git a/maxctrl/test/diagnostics.js b/maxctrl/test/diagnostics.js index e33bdda89..1e756105b 100644 --- a/maxctrl/test/diagnostics.js +++ b/maxctrl/test/diagnostics.js @@ -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', diff --git a/maxctrl/test/link.js b/maxctrl/test/link.js index ca5b16f2b..e6faf3924 100644 --- a/maxctrl/test/link.js +++ b/maxctrl/test/link.js @@ -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") diff --git a/maxctrl/test/startstop.js b/maxctrl/test/startstop.js index f0c851a56..8d89685f3 100644 --- a/maxctrl/test/startstop.js +++ b/maxctrl/test/startstop.js @@ -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') }) diff --git a/maxctrl/test/states.js b/maxctrl/test/states.js index 38b3ba1c9..f104df737 100644 --- a/maxctrl/test/states.js +++ b/maxctrl/test/states.js @@ -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') }) }) diff --git a/server/core/test/rest-api/test/monitor.js b/server/core/test/rest-api/test/monitor.js index e98160ba1..893b36b38 100644 --- a/server/core/test/rest-api/test/monitor.js +++ b/server/core/test/rest-api/test/monitor.js @@ -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) diff --git a/server/core/test/rest-api/test/schema_validation.js b/server/core/test/rest-api/test/schema_validation.js index dbdce53ce..968ded380 100644 --- a/server/core/test/rest-api/test/schema_validation.js +++ b/server/core/test/rest-api/test/schema_validation.js @@ -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/", diff --git a/server/core/test/rest-api/test/server.js b/server/core/test/rest-api/test/server.js index 0741e4790..dcc7671f7 100644 --- a/server/core/test/rest-api/test/server.js +++ b/server/core/test/rest-api/test/server.js @@ -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" }) }) }); diff --git a/server/core/test/rest-api/test/service.js b/server/core/test/rest-api/test/service.js index f0718cc8d..61a8fb4d4 100644 --- a/server/core/test/rest-api/test/service.js +++ b/server/core/test/rest-api/test/service.js @@ -98,7 +98,7 @@ describe("Service", function() { "attributes": { "parameters": { "port": 4012, - "protocol": "MySQLClient", + "protocol": "MariaDBClient", "authenticator": "MySQLAuth", "address": "127.0.0.1" } diff --git a/test/maxscale_test.cnf b/test/maxscale_test.cnf index 311b71771..23d185eef 100644 --- a/test/maxscale_test.cnf +++ b/test/maxscale_test.cnf @@ -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 diff --git a/test/maxscale_test_secondary.cnf b/test/maxscale_test_secondary.cnf index 44794e5b6..67fd02054 100644 --- a/test/maxscale_test_secondary.cnf +++ b/test/maxscale_test_secondary.cnf @@ -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