Fix unhandled promise rejection in create monitor
If a monitor was created with an argument that was not a key-value type, a promise would be rejected outside of the main maxctrl function. Added a test case that covers this and fixed a few other test coverage problems that were present.
This commit is contained in:
@ -15,5 +15,10 @@ describe("Draining servers", function() {
|
||||
.should.eventually.have.string("Maintenance")
|
||||
})
|
||||
|
||||
it('does not drain non-existent server', function() {
|
||||
return doCommand('drain server not-a-server')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
after(stopMaxScale)
|
||||
});
|
||||
|
Reference in New Issue
Block a user