Add unit tests for "server stop" command.
Change-Id: Idfa82f7f3aee3824aedf8b551be7942659530457 Implements: blueprint osc-unit-test-framework-improvement
This commit is contained in:
		| @@ -819,6 +819,26 @@ class TestServerStart(TestServer): | |||||||
|         self.run_method_with_servers('start', 3) |         self.run_method_with_servers('start', 3) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class TestServerStop(TestServer): | ||||||
|  |  | ||||||
|  |     def setUp(self): | ||||||
|  |         super(TestServerStop, self).setUp() | ||||||
|  |  | ||||||
|  |         # Get the command object to test | ||||||
|  |         self.cmd = server.StopServer(self.app, None) | ||||||
|  |  | ||||||
|  |         # Set methods to be tested. | ||||||
|  |         self.methods = { | ||||||
|  |             'stop': None, | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |     def test_server_stop_one_server(self): | ||||||
|  |         self.run_method_with_servers('stop', 1) | ||||||
|  |  | ||||||
|  |     def test_server_stop_multi_servers(self): | ||||||
|  |         self.run_method_with_servers('stop', 3) | ||||||
|  |  | ||||||
|  |  | ||||||
| class TestServerSuspend(TestServer): | class TestServerSuspend(TestServer): | ||||||
|  |  | ||||||
|     def setUp(self): |     def setUp(self): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tang Chen
					Tang Chen