diff --git a/maxctrl/test/cluster.js b/maxctrl/test/cluster.js index 5a1658012..48a112a48 100644 --- a/maxctrl/test/cluster.js +++ b/maxctrl/test/cluster.js @@ -179,7 +179,7 @@ describe('Cluster Sync', function() { }) it('sync after monitor creation', function() { - return doCommand('create monitor my-monitor-2 mysqlmon --hosts ' + secondary_host) + return doCommand('create monitor my-monitor-2 mysqlmon user=maxuser password=maxpwd --hosts ' + secondary_host) .then(() => verifyCommand('cluster sync ' + secondary_host + ' --hosts ' + primary_host, 'monitors/my-monitor-2')) }) diff --git a/maxctrl/test/createdestroy.js b/maxctrl/test/createdestroy.js index 0e4e745d0..3214aadbf 100644 --- a/maxctrl/test/createdestroy.js +++ b/maxctrl/test/createdestroy.js @@ -7,7 +7,7 @@ describe("Create/Destroy Commands", function() { before(startMaxScale) it('create monitor', function() { - return verifyCommand('create monitor my-monitor mysqlmon', 'monitors/my-monitor') + return verifyCommand('create monitor my-monitor mysqlmon user=maxuser password=maxpwd', 'monitors/my-monitor') .should.be.fulfilled }) diff --git a/server/core/test/rest-api/test/monitor.js b/server/core/test/rest-api/test/monitor.js index 16963a129..235f9fe0a 100644 --- a/server/core/test/rest-api/test/monitor.js +++ b/server/core/test/rest-api/test/monitor.js @@ -1,16 +1,21 @@ require("../utils.js")() -var monitor = { - data: { - id: "test-monitor", - type: "monitors", - attributes: { - module: "mysqlmon" +describe("Monitor", function() { + + var monitor = { + data: { + id: "test-monitor", + type: "monitors", + attributes: { + module: "mysqlmon", + parameters: { + user: "maxuser", + password: "maxpwd" + } + } } } -} -describe("Monitor", function() { before(startMaxScale) it("create new monitor", function() { @@ -42,6 +47,20 @@ describe("Monitor", function() { describe("Monitor Relationships", function() { before(startMaxScale) + var monitor = { + data: { + id: "test-monitor", + type: "monitors", + attributes: { + module: "mysqlmon", + parameters: { + user: "maxuser", + password: "maxpwd" + } + } + } + } + it("create new monitor", function() { return request.post(base_url + "/monitors/", {json: monitor}) .should.be.fulfilled