Skip to content

Commit 0fa9228

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add unit tests for "server unlock" command."
2 parents 906c492 + 4062d59 commit 0fa9228

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 TestServerUnlock(TestServer):
783+
784+
def setUp(self):
785+
super(TestServerUnlock, self).setUp()
786+
787+
# Get the command object to test
788+
self.cmd = server.UnlockServer(self.app, None)
789+
790+
# Set methods to be tested.
791+
self.methods = {
792+
'unlock': None,
793+
}
794+
795+
def test_server_unlock_one_server(self):
796+
self.run_method_with_servers('unlock', 1)
797+
798+
def test_server_unlock_multi_servers(self):
799+
self.run_method_with_servers('unlock', 3)
800+
801+
782802
class TestServerUnpause(TestServer):
783803

784804
def setUp(self):

0 commit comments

Comments
 (0)