Improve MaxCtrl test coverage
Added tests that cover areas that weren't tested before.
This commit is contained in:
19
maxctrl/test/drain.js
Normal file
19
maxctrl/test/drain.js
Normal file
@ -0,0 +1,19 @@
|
||||
require('../test_utils.js')()
|
||||
|
||||
describe("Draining servers", function() {
|
||||
before(startMaxScale)
|
||||
|
||||
it('drains server', function() {
|
||||
return doCommand('drain server server1')
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('checks server is in maintenance', function() {
|
||||
// The maintenance state isn't set instantly
|
||||
return sleepFor(2000)
|
||||
.then(() => doCommand('api get servers/server1 data.attributes.state'))
|
||||
.should.eventually.have.string("Maintenance")
|
||||
})
|
||||
|
||||
after(stopMaxScale)
|
||||
});
|
Reference in New Issue
Block a user