Bug 1433604

Summary: Fail to execute unit tests
Product: Red Hat OpenStack Reporter: Arie Bregman <abregman>
Component: openstack-neutronAssignee: Arie Bregman <abregman>
Status: CLOSED ERRATA QA Contact: Arie Bregman <abregman>
Severity: high Docs Contact:
Priority: low    
Version: 11.0 (Ocata)CC: amuller, chrisw, ekuris, jschluet, mburns, nyechiel, srevivo
Target Milestone: rcKeywords: Automation, AutomationBlocker
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: python-neutron-tests-10.0.0-11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 20:08:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Arie Bregman 2017-03-18 17:05:45 UTC
Description of problem:

Unable to run neutron OSP 11 unit tests. The problem seems to be the missing tests directory in oslo_db.

The failure is:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name
  File "neutron/tests/unit/db/test_sqlalchemytypes.py", line 17, in <module>
    from oslo_db.tests.sqlalchemy import base as test_base
ImportError: No module named tests.sqlalchemy
The test run didn't actually run any tests

Note: this is probably a packaging issue and not an issue with neutron. python-oslo-db should include the tests so we can run neutorn unit tests.

How reproducible: 100%

Steps to Reproduce:
1. Install python-oslo-db from puddle
2. Run neutron unit tests

Actual results: Fail to execute unit tests.

Expected results: All the unit tests passed successfully

Comment 3 Assaf Muller 2017-03-20 12:56:00 UTC
The fix is to add oslo-db-tests as a dependency of the Neutron tests subpackage in RDO master, backport it to RDO stable/ocata and that will be imported in to OSP 11 by release delivery.

Comment 5 Arie Bregman 2017-03-21 12:30:58 UTC
Thanks, it works.
Submitted patch to RDO: https://review.rdoproject.org/r/#/c/5877

Comment 6 Assaf Muller 2017-03-23 18:14:12 UTC
Arie added the package in component CI to unblock. For developers that install the tests RPM and want to run the unit tests, Arie will pursue the RDO patch.

Comment 7 Assaf Muller 2017-03-30 14:49:43 UTC
Fixed merged to RDO Ocata branch, will be available in OSP 11 in next import.

Comment 9 errata-xmlrpc 2017-05-17 20:08:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.