Skip to content

Commit 8d52326

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add unit tests for "server stop" command."
2 parents d69906a + dacd5dc commit 8d52326

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

openstackclient/tests/compute/v2/test_server.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,26 @@ def test_server_start_multi_servers(self):
819819
self.run_method_with_servers('start', 3)
820820

821821

822+
class TestServerStop(TestServer):
823+
824+
def setUp(self):
825+
super(TestServerStop, self).setUp()
826+
827+
# Get the command object to test
828+
self.cmd = server.StopServer(self.app, None)
829+
830+
# Set methods to be tested.
831+
self.methods = {
832+
'stop': None,
833+
}
834+
835+
def test_server_stop_one_server(self):
836+
self.run_method_with_servers('stop', 1)
837+
838+
def test_server_stop_multi_servers(self):
839+
self.run_method_with_servers('stop', 3)
840+
841+
822842
class TestServerSuspend(TestServer):
823843

824844
def setUp(self):

0 commit comments

Comments
 (0)