From bf44aa65235631e8236ba0422620d0ee4789e470 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 26 Nov 2012 21:38:10 -0500 Subject: [PATCH] Fix test suite to use MiniDNS MiniDNS changes: * In create_entry/delete_entry, if we don't get a name then we throw an exception * In get_entries_by_address, filter out duplicates * Add a log.warn in addition to throwing an exception. Test Suite changes: * Updates base TestCase to use MiniDNS instead of the default DNSDriver. * Make sure we cleanup the dnstest.txt and the temporary directory in TestCase.tearDown() * Update a few tests to pass in display_name Fixes LP Bug #1081750 Change-Id: Ia8d80102deaeaaac166ab50bbd47279d72d1e389 --- nova/tests/fake_flags.py | 2 ++ nova/tests/test_xenapi.py | 1 + 2 files changed, 3 insertions(+) diff --git a/nova/tests/fake_flags.py b/nova/tests/fake_flags.py index 3fcc9fac..83ec33ca 100644 --- a/nova/tests/fake_flags.py +++ b/nova/tests/fake_flags.py @@ -45,3 +45,5 @@ def set_defaults(conf): conf.set_default('rpc_response_timeout', 5) conf.set_default('rpc_cast_timeout', 5) conf.set_default('lock_path', None) + conf.set_default('floating_ip_dns_manager', 'nova.tests.utils.dns_manager') + conf.set_default('instance_dns_manager', 'nova.tests.utils.dns_manager') diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 6d068625..acc1a6da 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -982,6 +982,7 @@ class XenAPIVMTestCase(stubs.XenAPITestBase): instance_values = { 'id': instance_id, 'uuid': '00000000-0000-0000-0000-00000000000%d' % instance_id, + 'display_name': 'host-%d' % instance_id, 'project_id': self.project_id, 'user_id': self.user_id, 'image_ref': 1,