diff options
| author | Ed Leafe <ed@leafe.com> | 2011-01-03 09:56:49 -0600 |
|---|---|---|
| committer | Ed Leafe <ed@leafe.com> | 2011-01-03 09:56:49 -0600 |
| commit | 5b240fe5d963e195525c42bf097d79b3f003c8d4 (patch) | |
| tree | 6da1ba783f3d713d5fad37d0ed693e0dc1086a60 /nova/tests | |
| parent | 108352d5c132f6accc79974d8c646a2bc7d4f127 (diff) | |
| parent | 0e88a58cf95bf9298a52d132cd1eb02f29c6bfe1 (diff) | |
| download | nova-5b240fe5d963e195525c42bf097d79b3f003c8d4.tar.gz nova-5b240fe5d963e195525c42bf097d79b3f003c8d4.tar.xz nova-5b240fe5d963e195525c42bf097d79b3f003c8d4.zip | |
merged latest trunk
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/test_servers.py | 16 | ||||
| -rw-r--r-- | nova/tests/test_xenapi.py | 6 |
2 files changed, 21 insertions, 1 deletions
diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py index 5d23db588..70ff714e6 100644 --- a/nova/tests/api/openstack/test_servers.py +++ b/nova/tests/api/openstack/test_servers.py @@ -95,6 +95,10 @@ class ServersTest(unittest.TestCase): fake_compute_api) self.stubs.Set(nova.compute.api.ComputeAPI, 'resume', fake_compute_api) + self.stubs.Set(nova.compute.api.ComputeAPI, "get_diagnostics", + fake_compute_api) + self.stubs.Set(nova.compute.api.ComputeAPI, "get_actions", + fake_compute_api) self.allow_admin = FLAGS.allow_admin_api def tearDown(self): @@ -274,6 +278,18 @@ class ServersTest(unittest.TestCase): res = req.get_response(nova.api.API('os')) self.assertEqual(res.status_int, 202) + def test_server_diagnostics(self): + req = webob.Request.blank("/v1.0/servers/1/diagnostics") + req.method = "GET" + res = req.get_response(nova.api.API("os")) + self.assertEqual(res.status_int, 404) + + def test_server_actions(self): + req = webob.Request.blank("/v1.0/servers/1/actions") + req.method = "GET" + res = req.get_response(nova.api.API("os")) + self.assertEqual(res.status_int, 404) + def test_server_reboot(self): body = dict(server=dict( name='server_test', imageId=2, flavorId=2, metadata={}, diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index f0d84e9aa..c95a53af3 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -166,6 +166,10 @@ class XenAPIVMTestCase(test.TestCase): instances = self.conn.list_instances() self.assertEquals(instances, []) + def test_get_diagnostics(self): + instance = self._create_instance() + self.conn.get_diagnostics(instance) + def test_instance_snapshot(self): stubs.stubout_instance_snapshot(self.stubs) instance = self._create_instance() @@ -253,7 +257,7 @@ class XenAPIVMTestCase(test.TestCase): 'kernel_id': 2, 'ramdisk_id': 3, 'instance_type': 'm1.large', - 'mac_address': 'aa:bb:cc:dd:ee:ff', + 'mac_address': 'aa:bb:cc:dd:ee:ff' } instance = db.instance_create(values) self.conn.spawn(instance) |
