Fix unit and functional tests

For unit and functional:

The commit d00a50aad11465d904663dea14b3814017bcff75 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
This commit is contained in:
Lucas Alvares Gomes 2017-09-13 12:37:15 +01:00
parent fcba4f2531
commit 72c7a90b55
6 changed files with 11 additions and 8 deletions

1
.gitignore vendored

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

3
.stestr.conf Normal file

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

@ -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

@ -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

@ -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

@ -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