Improve MaxCtrl test coverage
A few missing cases that simple to solve were reported by the coverage tool.
This commit is contained in:
@ -16,7 +16,7 @@ describe("API", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('sums integer values', function() {
|
||||
it('sums zero integer values', function() {
|
||||
return doCommand('api get servers data[].attributes.statistics.connections --sum')
|
||||
.then((res) => {
|
||||
js = JSON.parse(res)
|
||||
@ -24,6 +24,14 @@ describe("API", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('sums non-zero integer values', function() {
|
||||
return doCommand('api get --sum maxscale/threads data[].attributes.stats.reads')
|
||||
.then((res) => {
|
||||
js = JSON.parse(res)
|
||||
js.should.be.a('number')
|
||||
})
|
||||
})
|
||||
|
||||
it('does not sum string values', function() {
|
||||
return doCommand('api get servers data[].id --sum')
|
||||
.then((res) => {
|
||||
|
Reference in New Issue
Block a user