Register DNSMASQ_OPTS in functional sanity tests

test_dnsmasq_version() is sometimes triggering a traceback
because the new dnsmasq_enable_addr6_list config option isn't
being found. Register the option in the test class.

Change-Id: Ie441f831bcd0835ae8e1cd082005640b65b7393a
Closes-bug: #1866129
This commit is contained in:
Brian Haley 2020-03-04 17:30:15 -05:00 committed by Bernard Cafarelli
parent 92d54faa7b
commit cc281afeec
No known key found for this signature in database
GPG Key ID: 9531F08245465A52
1 changed files with 7 additions and 0 deletions

View File

@ -13,7 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from neutron.cmd.sanity import checks
from neutron.conf.agent import dhcp as dhcp_conf
from neutron.tests.functional import base
@ -24,6 +27,10 @@ class SanityTestCase(base.BaseLoggingTestCase):
neutron-sanity-check runs without throwing an exception, as in the case
where someone modifies the API without updating the check script.
"""
def setUp(self):
super(SanityTestCase, self).setUp()
# needed for test_dnsmasq_version()
cfg.CONF.register_opts(dhcp_conf.DNSMASQ_OPTS)
def test_nova_notify_runs(self):
checks.nova_notify_supported()