diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-10 21:06:05 -0500 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-11 13:33:56 -0500 |
| commit | 0a2d839f1b8b1bc67c3fd3bf5ecc0c4c5ab36b0e (patch) | |
| tree | ea9b3023f685fd925df76066564622204306185e /nova/tests | |
| parent | 6bd44ccb3a4bf8536f6bca9b81517d2b24c31f14 (diff) | |
Converting consoles calls to use instance objects
Related to blueprint internal-uuids
Change-Id: I39da4d98ff64e8db22eecb1966f6506e8f14361e
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_compute.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index a4d86deec..0a0224beb 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -1839,4 +1839,33 @@ class ComputeAPITestCase(BaseTestCase): instance = self.compute_api.get(self.context, instance_id) self.compute_api.add_fixed_ip(self.context, instance, '1') self.compute_api.remove_fixed_ip(self.context, instance, '192.168.1.1') + + def test_vnc_console(self): + """Make sure we can a vnc console for an instance.""" + def vnc_rpc_call_wrapper(*args, **kwargs): + return {'token': 'asdf', 'host': '0.0.0.0', 'port': 8080} + + self.stubs.Set(rpc, 'call', vnc_rpc_call_wrapper) + + instance_id = self._create_instance() + instance = self.compute_api.get(self.context, instance_id) + console = self.compute_api.get_vnc_console(self.context, instance) + self.compute_api.delete(self.context, instance) + + def test_ajax_console(self): + """Make sure we can a vnc console for an instance.""" + def ajax_rpc_call_wrapper(*args, **kwargs): + return {'token': 'asdf', 'host': '0.0.0.0', 'port': 8080} + + self.stubs.Set(rpc, 'call', ajax_rpc_call_wrapper) + + instance_id = self._create_instance() + instance = self.compute_api.get(self.context, instance_id) + console = self.compute_api.get_ajax_console(self.context, instance) + self.compute_api.delete(self.context, instance) + + def test_console_output(self): + instance_id = self._create_instance() + instance = self.compute_api.get(self.context, instance_id) + console = self.compute_api.get_console_output(self.context, instance) self.compute_api.delete(self.context, instance) |
