MXS-1300: Correct test case descriptions
The test descriptions now describe the expected logical outcome of the test, not the operation being done.
This commit is contained in:
parent
d64cb9fa80
commit
80569dd5a9
@ -10,12 +10,12 @@ describe("Alter Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('alter server with bad parameters', function() {
|
||||
it('will not alter server with bad parameters', function() {
|
||||
return doCommand('alter server server1 port not-a-port')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('alter nonexistent server', function() {
|
||||
it('will not alter nonexistent server', function() {
|
||||
return doCommand('alter server server123 port 3000')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -27,12 +27,12 @@ describe("Alter Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('alter monitor with bad parameters', function() {
|
||||
it('will not alter monitor with bad parameters', function() {
|
||||
return doCommand('alter monitor MySQL-Monitor monitor_interval not-a-number')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('alter nonexistent monitor', function() {
|
||||
it('will not alter nonexistent monitor', function() {
|
||||
return doCommand('alter monitor monitor123 monitor_interval 3000')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -44,12 +44,12 @@ describe("Alter Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('alter non-existent service parameter', function() {
|
||||
it('will not alter non-existent service parameter', function() {
|
||||
return doCommand('alter service Read-Connection-Router turbocharge yes-please')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('alter non-existent service', function() {
|
||||
it('will not alter non-existent service', function() {
|
||||
return doCommand('alter service not-a-service user maxuser')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -65,7 +65,7 @@ describe("Alter Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('alter logging with bad parameter', function() {
|
||||
it('will not alter logging with bad parameter', function() {
|
||||
doCommand('alter logging some-parameter maybe')
|
||||
.should.be.rejectted
|
||||
})
|
||||
@ -77,7 +77,7 @@ describe("Alter Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('alter maxscale with bad parameter', function() {
|
||||
it('will not alter maxscale with bad parameter', function() {
|
||||
return doCommand('alter maxscale some_timeout 123')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
@ -10,12 +10,12 @@ describe("Module Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('call command with missing parameters', function() {
|
||||
it('will not call command with missing parameters', function() {
|
||||
return doCommand('call command qlafilter log')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('call command with too many parameters', function() {
|
||||
it('will not call command with too many parameters', function() {
|
||||
return doCommand('call command qlafilter log QLA too many arguments for this command')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
@ -18,22 +18,22 @@ describe("Create/Destroy Commands", function() {
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('destroy the same monitor again', function() {
|
||||
it('will not destroy the same monitor again', function() {
|
||||
return doCommand('destroy monitor my-monitor')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('destroy nonexistent monitor', function() {
|
||||
it('will not destroy nonexistent monitor', function() {
|
||||
return doCommand('destroy monitor monitor123')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('create monitor with bad parameters', function() {
|
||||
it('will not create monitor with bad parameters', function() {
|
||||
return doCommand('create monitor my-monitor some-module')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('create monitor with bad options', function() {
|
||||
it('will not create monitor with bad options', function() {
|
||||
return doCommand('create monitor my-monitor mysqlmon --this-is-not-an-option')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -50,7 +50,7 @@ describe("Create/Destroy Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('create already existing monitor', function() {
|
||||
it('will not create already existing monitor', function() {
|
||||
return doCommand('create monitor my-monitor mysqlmon')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -65,12 +65,12 @@ describe("Create/Destroy Commands", function() {
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('create server with bad parameters', function() {
|
||||
it('will not create server with bad parameters', function() {
|
||||
return doCommand('create server server5 bad parameter')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('create server with bad options', function() {
|
||||
it('will not create server with bad options', function() {
|
||||
return doCommand('create server server5 bad parameter --this-is-not-an-option')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -94,12 +94,12 @@ describe("Create/Destroy Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('create already existing server', function() {
|
||||
it('will not create already existing server', function() {
|
||||
return doCommand('create server server1 127.0.0.1 3000')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('destroy nonexistent server', function() {
|
||||
it('will not destroy nonexistent server', function() {
|
||||
return doCommand('destroy server server123')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -110,12 +110,12 @@ describe("Create/Destroy Commands", function() {
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('create already existing listener', function() {
|
||||
it('will not create already existing listener', function() {
|
||||
return doCommand('create listener RW-Split-Router my-listener 7890')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('create listener with already used port', function() {
|
||||
it('will not create listener with already used port', function() {
|
||||
return doCommand('create listener RW-Split-Router my-listener2 4567')
|
||||
.should.be.rejected
|
||||
})
|
||||
@ -125,7 +125,7 @@ describe("Create/Destroy Commands", function() {
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('destroy static listener', function() {
|
||||
it('will not destroy static listener', function() {
|
||||
return doCommand('destroy listener RW-Split-Router RW-Split-Listener')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
@ -17,12 +17,12 @@ describe("Enable/Disable Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('enable log-priority with bad parameter', function() {
|
||||
it('will not enable log-priority with bad parameter', function() {
|
||||
return doCommand('enable log-priority bad-stuff')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('disable log-priority with bad parameter', function() {
|
||||
it('will not disable log-priority with bad parameter', function() {
|
||||
return doCommand('disable log-priority bad-stuff')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
@ -45,22 +45,22 @@ describe("Link/Unlink Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('link non-existent service to servers', function() {
|
||||
it('will not link non-existent service to servers', function() {
|
||||
return doCommand('link service not-a-service server1 server2 server3 server4')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('link non-existent monitor to servers', function() {
|
||||
it('will not link non-existent monitor to servers', function() {
|
||||
return doCommand('link monitor not-a-monitor server1 server2 server3 server4')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('unlink non-existent service to servers', function() {
|
||||
it('will not unlink non-existent service to servers', function() {
|
||||
return doCommand('unlink service not-a-service server1 server2 server3 server4')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('unlink non-existent monitor to servers', function() {
|
||||
it('will not unlink non-existent monitor to servers', function() {
|
||||
return doCommand('unlink monitor not-a-monitor server1 server2 server3 server4')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
@ -58,7 +58,7 @@ describe("Library invocation", function() {
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('bad user credentials', function() {
|
||||
it('reject on bad user credentials', function() {
|
||||
var opts = { extra_args: [ '--quiet', '--user', 'not-a-user', '--password', 'not-a-password'] }
|
||||
return ctrl.execute('list servers'.split(' '), opts)
|
||||
.should.be.rejected
|
||||
@ -70,7 +70,7 @@ describe("Library invocation", function() {
|
||||
.should.be.fulfilled
|
||||
})
|
||||
|
||||
it('connection failure', function() {
|
||||
it('reject on connection failure', function() {
|
||||
stopMaxScale()
|
||||
.then(function() {
|
||||
return ctrl.execute('list servers'.split(' '))
|
||||
|
@ -22,12 +22,12 @@ describe("Set/Clear Commands", function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('set incorrect state', function() {
|
||||
it('reject set incorrect state', function() {
|
||||
return doCommand('set server server2 something')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('clear incorrect state', function() {
|
||||
it('reject clear incorrect state', function() {
|
||||
return doCommand('clear server server2 something')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user