Reintroduce strict regex for extra_dhcp_opt test

This is partial revert of [1]. The issue got triggered
as by default dhcp_domain is set to 'novalocal' in nova and
dhclient includes that local domain when setting up
resolv.conf as part of [2].

To have predictable domain only derived as part of
neutron configuration the job unset's dhcp_domain in
nova conf.

[1] https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/904331
[2] https://bugzilla.redhat.com/show_bug.cgi?id=637763

Change-Id: Id5966cc7447a688ad1a1a8800993096d18f29194
This commit is contained in:
yatinkarel 2023-12-26 12:19:28 +05:30
parent 774d40c5c4
commit 492aefd7c8
2 changed files with 4 additions and 5 deletions

View File

@ -241,11 +241,7 @@ class ExtraDhcpOptionsTest(base.BaseTempestTestCase):
# ipv4.domain is expected
vm_resolv_conf = vm_ssh_client.exec_command(
"sudo dhclient && cat /etc/resolv.conf")
# (rsafrono) for some reason with devstack there is sometimes one more
# entry in the 'search' line, a char 'n' before the end of the line
# causing the test to fail. Changing the regex to be less stict
# in order to unblock the gates.
self.assertIsNotNone(re.search(r'^search\s+{}\s+'.format(domain_value),
self.assertIsNotNone(re.search(r'^search\s+{}$'.format(domain_value),
vm_resolv_conf,
re.MULTILINE))

View File

@ -184,6 +184,9 @@
$NEUTRON_DHCP_CONF:
agent:
availability_zone: nova
$NOVA_CONF:
api:
dhcp_domain: ''
test-config:
$TEMPEST_CONFIG:
neutron_plugin_options: