diff options
| author | Clark Boylan <clark.boylan@gmail.com> | 2012-12-07 11:30:02 -0800 |
|---|---|---|
| committer | Clark Boylan <clark.boylan@gmail.com> | 2012-12-07 11:30:02 -0800 |
| commit | 932af34740162406aced0b08c54b7213bbd5022f (patch) | |
| tree | c3ce4ada582272fae95af439ea096ff4a211c771 /nova | |
| parent | 87e609ca8e038c89de7853c2461088ebad645f9e (diff) | |
Fix network manager ipv6 tests.
When using a test runner that runs tests in a different order than
nosetests it is possible that IPv6AccountIdentiferTestCase tests run
before CommonNetworkTestCase. If this happens
IPv6AccountIdentiferTestCase sets the ipv6_backend to account_identifier
which causes the regexes in
CommonNetworkTestCase.test_get_instance_uuids_by_ipv6_regex to not
match.
Explicitly set the ipv6_backend to rfc2462 in CommonNetworkTestCase's
setUp() to ensure the regex's match the addresses in the fake network
DB.
Part of blueprint grizzly-testtools
Change-Id: I0fdb5c3d4130c6cf23b22bca6645581f603a79c5
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/network/test_manager.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/tests/network/test_manager.py b/nova/tests/network/test_manager.py index b12d12167..700b74141 100644 --- a/nova/tests/network/test_manager.py +++ b/nova/tests/network/test_manager.py @@ -23,6 +23,7 @@ from nova import context from nova import db from nova.db.sqlalchemy import models from nova import exception +from nova import ipv6 from nova.network import linux_net from nova.network import manager as network_manager from nova.openstack.common import importutils @@ -1118,6 +1119,8 @@ class CommonNetworkTestCase(test.TestCase): def setUp(self): super(CommonNetworkTestCase, self).setUp() self.context = context.RequestContext('fake', 'fake') + self.flags(ipv6_backend='rfc2462') + ipv6.reset_backend() def fake_create_fixed_ips(self, context, network_id, fixed_cidr=None): return None |
