Skip to content

Commit 7886fdd

Browse files
committed
Add unit tests for "server unpause" command.
Change-Id: Ia74d9875b8aa413b84d0077d22adb75b866a5701 Implements: blueprint osc-unit-test-framework-improvement
1 parent 569ff3d commit 7886fdd

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
@@ -759,6 +759,26 @@ def test_server_resize_revert(self):
759759
)
760760

761761

762+
class TestServerUnpause(TestServer):
763+
764+
def setUp(self):
765+
super(TestServerUnpause, self).setUp()
766+
767+
# Get the command object to test
768+
self.cmd = server.UnpauseServer(self.app, None)
769+
770+
# Set methods to be tested.
771+
self.methods = {
772+
'unpause': None,
773+
}
774+
775+
def test_server_unpause_one_server(self):
776+
self.run_method_with_servers('unpause', 1)
777+
778+
def test_server_unpause_multi_servers(self):
779+
self.run_method_with_servers('unpause', 3)
780+
781+
762782
class TestServerGeneral(testtools.TestCase):
763783
OLD = {
764784
'private': [

0 commit comments

Comments
 (0)