Fix api-replay unittest teardown
The api-replay unittests change the global resources attributes, causing other nsx-v3 tests to fail. This patch reverts those changes at teardown. Change-Id: I4f03ac558604cb82b8d0f3ea01fc884174ffb153
This commit is contained in:
parent
cc9b311dc9
commit
1b2bbb3544
@ -15,6 +15,7 @@
|
||||
|
||||
from vmware_nsx.tests.unit.nsx_v3 import test_plugin
|
||||
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron_lib.plugins import directory
|
||||
from oslo_config import cfg
|
||||
|
||||
@ -35,6 +36,12 @@ class TestApiReplay(test_plugin.NsxV3PluginTestCaseMixin):
|
||||
directory.get_plugin().supported_extension_aliases.remove(
|
||||
'api-replay')
|
||||
|
||||
# Revert the attributes map back to normal
|
||||
for attr_name in ('ports', 'networks', 'security_groups',
|
||||
'security_group_rules', 'routers', 'policies'):
|
||||
attr_info = attributes.RESOURCE_ATTRIBUTE_MAP[attr_name]
|
||||
attr_info['id']['allow_post'] = False
|
||||
|
||||
super(TestApiReplay, self).tearDown()
|
||||
|
||||
def test_create_port_specify_id(self):
|
||||
|
Loading…
Reference in New Issue
Block a user