Browse Source

Fix unit and functional tests

For unit and functional:

The commit d00a50aad1 moved the
plugins.ml2.config module to conf.plugins.ml2.config

For functional tests only:

Modify the post_test_hook.sh script to accomodate the new changes in
os-testr. This fix for networking-ovn is basically a copy & paste from
the neutron one [0].

[0] https://review.openstack.org/#/c/503138/

Change-Id: I4fbcbfdd6d5f9fa77414df15302da517f23986bd
changes/02/503602/3
Lucas Alvares Gomes 4 years ago
parent
commit
72c7a90b55
6 changed files with 11 additions and 8 deletions
  1. +1
    -0
      .gitignore
  2. +3
    -0
      .stestr.conf
  3. +5
    -5
      networking_ovn/tests/contrib/post_test_hook.sh
  4. +1
    -1
      networking_ovn/tests/functional/base.py
  5. +1
    -1
      networking_ovn/tests/unit/ml2/test_mech_driver.py
  6. +0
    -1
      test-requirements.txt

+ 1
- 0
.gitignore View File

@ -50,6 +50,7 @@ ChangeLog
!/.gitreview
!/.mailmap
!/.pylintrc
!/.stestr.conf
!/.testr.conf
!/devstack/lib


+ 3
- 0
.stestr.conf View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./networking_ovn/tests/unit}
top_dir=./

+ 5
- 5
networking_ovn/tests/contrib/post_test_hook.sh View File

@ -11,11 +11,11 @@ venv=${1:-"dsvm-functional"}
function generate_testr_results {
# Give job user rights to access tox logs
sudo -H -u $owner chmod o+rw .
sudo -H -u $owner chmod o+rw -R .testrepository
if [ -f ".testrepository/0" ] ; then
.tox/$venv/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit
$SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html
gzip -9 ./testrepository.subunit
sudo -H -u $owner chmod o+rw -R .stestr
if [ -f ".stestr/0" ] ; then
.tox/$venv/bin/subunit-1to2 < .stestr/0 > ./stestr.subunit
$SCRIPTS_DIR/subunit2html ./stestr.subunit testr_results.html
gzip -9 ./stestr.subunit
gzip -9 ./testr_results.html
sudo mv ./*.gz /opt/stack/logs/
fi


+ 1
- 1
networking_ovn/tests/functional/base.py View File

@ -16,7 +16,7 @@ import time
import fixtures
import mock
from neutron.plugins.ml2 import config
from neutron.conf.plugins.ml2 import config
from neutron.plugins.ml2.drivers import type_geneve # noqa
from neutron.tests.unit.plugins.ml2 import test_plugin
from neutron_lib.plugins import constants


+ 1
- 1
networking_ovn/tests/unit/ml2/test_mech_driver.py View File

@ -26,8 +26,8 @@ from neutron_lib.plugins import directory
from neutron_lib.utils import net as n_net
from oslo_db import exception as os_db_exc
from neutron.conf.plugins.ml2 import config
from neutron.db import provisioning_blocks
from neutron.plugins.ml2 import config
from neutron.plugins.ml2.drivers import type_geneve # noqa
from neutron.tests import tools
from neutron.tests.unit.extensions import test_segment


+ 0
- 1
test-requirements.txt View File

@ -13,7 +13,6 @@ doc8 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
pylint==1.4.5 # GPLv2
testrepository>=0.0.18 # Apache-2.0/BSD
testresources>=0.2.4 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
WebTest>=2.0 # MIT


Loading…
Cancel
Save