commit b68d2a78a4b34497e376a7be545a20a23d036191 Author: Flavio Fernandes Date: Tue Sep 29 15:12:30 2020 -0400 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 481f0b3b3c6014c23b9619b6c361754d0185dce1. Related-bug: #1894117 Closes-bug: #1896678 Co-Authored-By: Jakub Libosvar Change-Id: Ic753232ee576fb8b663af5c4a68635bb40a40edc diff --git a/ovn_octavia_provider/tests/functional/test_integration.py b/ovn_octavia_provider/tests/functional/test_integration.py index a0ede30..55fd616 100644 --- a/ovn_octavia_provider/tests/functional/test_integration.py +++ b/ovn_octavia_provider/tests/functional/test_integration.py @@ -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): diff --git a/tox.ini b/tox.ini index 9a2400b..48a2b04 100644 --- a/tox.ini +++ b/tox.ini @@ -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