Skip to content

Commit c176987

Browse files
committed
Add unit tests for "server suspend" command.
Change-Id: Idfdd98fd27d97e1216abe9b14d3dea7c8f2a5a68 Implements: blueprint osc-unit-test-framework-improvement
1 parent 4062d59 commit c176987

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
@@ -779,6 +779,26 @@ def test_server_resize_revert(self):
779779
)
780780

781781

782+
class TestServerSuspend(TestServer):
783+
784+
def setUp(self):
785+
super(TestServerSuspend, self).setUp()
786+
787+
# Get the command object to test
788+
self.cmd = server.SuspendServer(self.app, None)
789+
790+
# Set methods to be tested.
791+
self.methods = {
792+
'suspend': None,
793+
}
794+
795+
def test_server_suspend_one_server(self):
796+
self.run_method_with_servers('suspend', 1)
797+
798+
def test_server_suspend_multi_servers(self):
799+
self.run_method_with_servers('suspend', 3)
800+
801+
782802
class TestServerUnlock(TestServer):
783803

784804
def setUp(self):

0 commit comments

Comments
 (0)