]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Call config_parse in base test setup
authorKevin Benton <blak111@gmail.com>
Sat, 19 Jul 2014 07:54:09 +0000 (00:54 -0700)
committerKevin Benton <blak111@gmail.com>
Sun, 27 Jul 2014 20:31:12 +0000 (13:31 -0700)
commitd98ca642402bafbaa15ac3df588ed34d58d8456b
tree79dce9e7cf1463e862433502972fff1d51e13f9b
parent00d638a5532c371415915829b67718eb0bb625a9
Call config_parse in base test setup

Some of the tests (e.g. NeutronDbPluginV2AsMixinTestCase) do not call
config_parse so if the database engine is not already been setup by another
test before the config object is reset on teardown, the database connection
will fail since the database config is then empty.

This patch adds a new setup_config method called during the base test case
setUp method which calls config_parse by default to load the default config.
Tests that couldn't use the default config were then modified to override the
setup_config method.

Some other unit tests were slightly adjusted to pass using the default config.

Closes-Bug: #1346673
Change-Id: I3724200fa932115c0a8c264640b1a9dbe431a1cc
neutron/tests/base.py
neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
neutron/tests/unit/test_agent_netns_cleanup.py
neutron/tests/unit/test_agent_ovs_cleanup.py
neutron/tests/unit/test_config.py
neutron/tests/unit/test_dhcp_agent.py
neutron/tests/unit/test_l3_agent.py