Test runtime size validation

Added tests into the MaxCtrl test suite that confirm size types are
properly handled.
This commit is contained in:
Markus Mäkelä 2018-08-09 14:40:02 +03:00
parent 290dcff48e
commit 390c749d4a
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -93,5 +93,20 @@ describe("Alter Commands", function() {
.should.be.rejected
})
it('rejects negative size values', function() {
return doCommand('alter maxscale query_classifier_cache_size -1M')
.should.be.rejected
})
it('rejects bad size values', function() {
return doCommand('alter maxscale query_classifier_cache_size all-available-memory')
.should.be.rejected
})
it('rejects percentage as a size value', function() {
return doCommand('alter maxscale query_classifier_cache_size 50%')
.should.be.rejected
})
after(stopMaxScale)
});