Fix and enable test_port_forwarding

This test began failing because of inconsistencies in the
in-memory neutron db that occur since the change
https://review.opendev.org/#/c/750295/ got merged.

The failure observed was that an entry in the port forwarding
table was created but never got added as a row. When the get
operation for the entry created happened, it raised a not found
exception. To avoid this situation the test will now use
OS_TEST_DBAPI_ADMIN_CONNECTION=sqlite:///sqlite.db

This reverts commit 481f0b3b3c.
Related-bug: #1894117
Closes-bug: #1896678
Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>
Change-Id: Ic753232ee576fb8b663af5c4a68635bb40a40edc
This commit is contained in:
Flavio Fernandes 2020-09-29 15:12:30 -04:00
parent a6775f9859
commit b68d2a78a4
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,6 @@ from ovn_octavia_provider.tests.functional import base as ovn_base
from neutron_lib.api.definitions import floating_ip_port_forwarding as pf_def
from neutron_lib.utils import runtime
from neutron_lib.utils import test
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
@ -86,7 +85,6 @@ class TestOvnOctaviaProviderIntegration(ovn_base.TestOvnOctaviaBase):
expected_lbs = self._make_expected_lbs(lb_data)
self._validate_loadbalancers(expected_lbs)
@test.unstable_test("bug 1896678")
def test_port_forwarding(self):
def _verify_pf_lb(test, protocol, vip_ext_port, vip_int_port):

View File

@ -38,6 +38,9 @@ setenv =
{[testenv]setenv}
OS_TEST_PATH=./ovn_octavia_provider/tests/functional
OS_TEST_TIMEOUT=240
# TODO(flaviof): remove line below when issue with in-memory db is fixed
# and functional works w/out this workaround.
OS_TEST_DBAPI_ADMIN_CONNECTION=sqlite:///sqlite.db
deps = {[testenv]deps}
-r{toxinidir}/ovn_octavia_provider/tests/functional/requirements.txt