MXS-1220: Add test for monitor alteration regression

Altering monitor parameters without defining the relationships was
interpreted as an attempt to remove all relationships. This test
reproduces the problem.
This commit is contained in:
Markus Mäkelä 2017-07-07 11:42:16 +03:00
parent 4913cf1ec7
commit 731d19ba70

View File

@ -133,3 +133,30 @@ describe("Monitor Actions", function() {
after(stopMaxScale)
})
describe("Monitor Regressions", function() {
before(startMaxScale)
it("alter monitor should not remove servers", function() {
var b = {
data: {
attributes: {
parameters: {
user: "test"
}
}
}
}
return request.patch(base_url + "/monitors/MySQL-Monitor", {json: b})
.then(function() {
return request.get(base_url + "/monitors/MySQL-Monitor")
})
.then(function(resp) {
var mon = JSON.parse(resp)
mon.data.relationships.servers.data.should.not.be.empty
})
});
after(stopMaxScale)
})