diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 15:00:51 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 15:00:51 +0800 |
commit | 7332806d416bfac209fdda72854533f3e5489de8 (patch) | |
tree | c36fa481b2b9ba6b65b9803226186910193f06ea /vio | |
parent | 2b77de166471325e417d0f46375a3f2faae0898c (diff) |
Add test_operate_server_resume
Add test_operate_server_resume
Change-Id: I39d9d7c5c399716a5def8452b305449c99d15fce
Issue-ID: MULTICLOUD-199
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/tests/test_fake_nova_view.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_nova_view.py b/vio/vio/tests/test_fake_nova_view.py index 35ff922..3d322cd 100644 --- a/vio/vio/tests/test_fake_nova_view.py +++ b/vio/vio/tests/test_fake_nova_view.py @@ -98,6 +98,20 @@ class TestFakeNovaServer(unittest.TestCase): self.assertEqual( "POWERING_ON", fakeResponse.serverMapps[Server]['status']) + def test_operate_server_resume(self): + req = mock.Mock() + req.META = { + "HTTP_X_AUTH_TOKEN": Token + } + req.body = json.dumps({ + "resume": {} + }) + fakeResponse.serverMapps[Server]['status'] = "SUSPENDED" + resp = self.view.post(req, "abcd", Server) + self.assertEqual(202, resp.status_code) + self.assertEqual( + "ACTIVE", fakeResponse.serverMapps[Server]['status']) + class TestFakeNovaHypervisors(unittest.TestCase): |