 f422e92496
			
		
	
	f422e92496
	
	
	
		
			
			The `execute` command now returns the output of the command instead of printint it. This allows the tests to actually test the output of the commands instead manually verifying that it is correct. It also allows the library part to be used as an actual library that only returns data.
		
			
				
	
	
		
			39 lines
		
	
	
		
			748 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			748 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| require('../test_utils.js')()
 | |
| 
 | |
| describe("Unknown Commands", function() {
 | |
|     before(startMaxScale)
 | |
| 
 | |
|     var endpoints = [
 | |
|         'list',
 | |
|         'show',
 | |
|         'set',
 | |
|         'clear',
 | |
|         'enable',
 | |
|         'disable',
 | |
|         'create',
 | |
|         'destroy',
 | |
|         'link',
 | |
|         'unlink',
 | |
|         'start',
 | |
|         'stop',
 | |
|         'alter',
 | |
|         'rotate',
 | |
|         'call',
 | |
|         'cluster'
 | |
|     ]
 | |
| 
 | |
|     endpoints.forEach(function (i) {
 | |
|         it('unknown ' + i + ' command', function() {
 | |
|             return doCommand(i + ' something')
 | |
|                 .should.be.rejected
 | |
|         })
 | |
|     })
 | |
| 
 | |
|     it('generic unknown command', function() {
 | |
|         return doCommand('something')
 | |
|             .should.be.rejected
 | |
|     })
 | |
| 
 | |
|     after(stopMaxScale)
 | |
| });
 |