tests: fix functional tests

Neutron introduces an additional layer of protection when it comes
to dead VLANs, however, the VPNaaS did not have that change in it's
tests which meant that traffic was not reachable inside the
functional tests[1].

This patch changes the base class of the TestIPSecBase to use the
L3AgentTestFramework instead, and does a small refactor of the
setUp() function as well to remove extra calls.

This should stop any further changes in Neutron from breaking VPNaaS
since hopefully that class will carry the fixes down.  However, there
are a lot of duplicated code from the base class into this one,
however, this patch is focused at making a simple backportable
change for now.  Long term, it would be good to drop more of the
redundant code in there.

This patch also drops lower-constraints.txt testing jobs in the
backport to allow for the gating to merge this.

[1]: I0391dd24224f8656a09ddb002e7dae8783ba37a4

Conflicts:
    neutron_vpnaas/tests/functional/common/test_scenario.py

Change-Id: I04793caeaa71adbb1abcbda58aa43e63ce51d1e6
(cherry picked from commit bf155a8ee7)
This commit is contained in:
Mohammed Naser 2022-04-20 17:13:14 -04:00
parent 2cf3451517
commit c5ff00aaa0
4 changed files with 2 additions and 148 deletions

View File

@ -2,7 +2,6 @@
templates:
- check-requirements
- openstack-cover-jobs-neutron
- openstack-lower-constraints-jobs-neutron
- openstack-python3-wallaby-jobs-neutron
- periodic-stable-jobs-neutron
- publish-openstack-docs-pti

View File

@ -1,135 +0,0 @@
alabaster==0.7.10
alembic==0.9.6
amqp==2.5.0
appdirs==1.4.3
asn1crypto==0.23.0
beautifulsoup4==4.6.0
cachetools==2.0.0
cffi==1.14.0
cliff==2.8.0
cmd2==0.8.0
contextlib2==0.4.0
coverage==4.0
cryptography==2.7
debtcollector==1.19.0
decorator==3.4.0
deprecation==1.0
dogpile.cache==0.6.5
dulwich==0.15.0
eventlet==0.22.0
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
future==0.16.0
futurist==1.2.0
greenlet==0.4.15
httplib2==0.9.1
idna==2.6
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
keystoneauth1==3.14.0
keystonemiddleware==4.17.0
kombu==4.6.1
linecache2==1.0.0
logilab-common==1.4.1
logutils==0.3.5
Mako==0.4.0
MarkupSafe==1.1.1
mock==2.0.0
monotonic==1.4
mox3==0.20.0
msgpack-python==0.5.6
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
neutron-lib==2.6.0
openstacksdk==0.31.2
os-client-config==1.28.0
os-service-types==1.7.0
os-xenapi==0.3.4
osc-lib==1.8.0
oslo.cache==1.26.0
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.context==2.20.0
oslo.db==4.44.0
oslo.i18n==3.20.0
oslo.log==4.2.1
oslo.messaging==7.0.0
oslo.middleware==3.31.0
oslo.policy==1.30.0
oslo.privsep==2.3.0
oslo.reports==1.18.0
oslo.rootwrap==5.8.0
oslo.serialization==2.25.0
oslo.service==1.31.0
oslo.utils==4.4.0
oslo.versionedobjects==1.35.1
oslotest==3.2.0
osprofiler==2.4.0
ovs==2.8.0
ovsdbapp==1.3.0
paramiko==2.0.0
Paste==2.0.2
PasteDeploy==1.5.0
pbr==4.0.0
pecan==1.3.2
pika==0.10.0
pika-pool==0.1.3
positional==1.2.1
prettytable==0.7.2
psutil==3.2.2
pyasn1==0.1.8
pycadf==1.1.0
pycparser==2.18
pyinotify==0.9.6
pyparsing==2.1.0
pyperclip==1.5.27
pyroute2==0.5.13
python-dateutil==2.7.0
python-designateclient==2.7.0
python-editor==1.0.3
python-keystoneclient==3.8.0
python-mimeparse==1.6.0
python-neutronclient==6.7.0
python-novaclient==9.1.0
python-subunit==1.0.0
pytz==2015.7
PyYAML==3.12
repoze.lru==0.7
requests==2.14.2
requests-mock==1.2.0
requestsexceptions==1.2.0
rfc3986==0.3.1
Routes==2.3.1
ryu==4.24
simplejson==3.5.1
snowballstemmer==1.2.1
sphinxcontrib-websupport==1.0.1
SQLAlchemy==1.2.0
sqlalchemy-migrate==0.11.0
sqlparse==0.2.2
statsd==3.2.1
stestr==1.0.0
stevedore==1.20.0
tempest==17.1.0
Tempita==0.5.2
tenacity==6.0.0
testrepository==0.0.18
testresources==2.0.0
testscenarios==0.4
testtools==2.2.0
tinyrpc==0.6
traceback2==1.4.0
unittest2==1.1.0
urllib3==1.21.1
vine==1.1.4
waitress==1.1.0
WebOb==1.8.2
WebTest==2.0.27
wrapt==1.12.0

View File

@ -17,7 +17,6 @@ from unittest import mock
import netaddr
from neutron.agent.common import ovs_lib
from neutron.agent.l3 import agent as neutron_l3_agent
from neutron.agent.l3 import l3_agent_extensions_manager as ext_manager
from neutron.agent.l3 import namespaces as n_namespaces
from neutron.agent.l3 import router_info
@ -32,7 +31,7 @@ from neutron.conf import common as common_config
from neutron.services.provider_configuration import serviceprovider_opts
from neutron.tests.common import l3_test_common
from neutron.tests.common import net_helpers
from neutron.tests.functional import base
from neutron.tests.functional.agent.l3 import framework
from neutron_lib import constants
from neutron_lib.utils import net as n_utils
from oslo_config import cfg
@ -288,7 +287,7 @@ class SiteInfoWithHaRouter(SiteInfo):
return info
class TestIPSecBase(base.BaseSudoTestCase):
class TestIPSecBase(framework.L3AgentTestFramework):
NESTED_NAMESPACE_SEPARATOR = '@'
def setUp(self):
@ -314,9 +313,6 @@ class TestIPSecBase(base.BaseSudoTestCase):
# Can reproduce the exception in the test only
ip_lib.send_ip_addr_adv_notif = mock.Mock()
self.conf = self._configure_agent('agent1')
self.agent = neutron_l3_agent.L3NATAgentWithStateReport('agent1',
self.conf)
self.vpn_agent = vpn_agent.L3WithVPNaaS(self.conf)
self.driver = self.vpn_agent.device_drivers[0]
self.driver.agent_rpc.get_vpn_services_on_host = mock.Mock(

View File

@ -155,9 +155,3 @@ commands = {toxinidir}/tools/generate_config_file_samples.sh
[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt