diff options
| author | Soren Hansen <soren@linux2go.dk> | 2011-03-10 21:13:07 +0100 |
|---|---|---|
| committer | Soren Hansen <soren@linux2go.dk> | 2011-03-10 21:13:07 +0100 |
| commit | 8aabc32a69bf47075a3fd8e677d1bd70cbbca339 (patch) | |
| tree | 131eef16f03028f1116b2487395994f5fe0c2900 /nova | |
| parent | e76aad24ce8a9b1b7de1b2f874c22c9995f3071f (diff) | |
| download | nova-8aabc32a69bf47075a3fd8e677d1bd70cbbca339.tar.gz nova-8aabc32a69bf47075a3fd8e677d1bd70cbbca339.tar.xz nova-8aabc32a69bf47075a3fd8e677d1bd70cbbca339.zip | |
Add basic test case.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/test_cloud.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index cf8ee7eff..db7c15aeb 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -353,6 +353,18 @@ class CloudTestCase(test.TestCase): self.assertEqual('', img.metadata['description']) shutil.rmtree(pathdir) + def test_metadata_works_without_kernel_and_ramdisk(self): + inst = db.instance_create(self.context, {'host': self.compute.host, + 'vcpus': 2, + 'image_id': '123456', + 'user_data': '' }) + fixed = self.network.allocate_fixed_ip(self.context, inst['id']) + try: + self.cloud.get_metadata(fixed) + finally: + self.network.deallocate_fixed_ip(self.context, fixed) + db.instance_destroy(self.context, inst['id']) + def test_update_of_instance_display_fields(self): inst = db.instance_create(self.context, {}) ec2_id = ec2utils.id_to_ec2_id(inst['id']) |
