Bug 1293840 - Manila setup.py Does Not Install Manila Tempest Tests
Summary: Manila setup.py Does Not Install Manila Tempest Tests
Keywords:
Status: CLOSED DUPLICATE of bug 1358065
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-manila
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Tom Barron
QA Contact: Dustin Schoenbrun
Don Domingo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-23 09:18 UTC by Rohan Kanade
Modified: 2016-08-29 19:27 UTC (History)
9 users (show)

Fixed In Version: openstack-manila-1.0.1-3.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-29 19:27:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Error running testr list-tests (38.00 KB, text/plain)
2016-03-10 08:40 UTC, Luigi Toscano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1513105 0 None None None 2016-02-04 20:56:38 UTC
Launchpad 1513953 0 None None None 2016-02-01 19:04:45 UTC
OpenStack gerrit 242002 0 None None None 2016-02-04 20:59:31 UTC
OpenStack gerrit 242620 0 None None None 2016-02-01 19:05:44 UTC
OpenStack gerrit 275332 0 None None None 2016-02-02 20:19:42 UTC
OpenStack gerrit 276441 0 None None None 2016-02-04 20:58:37 UTC
Red Hat Bugzilla 1310767 0 unspecified CLOSED Missing scenario tests for python-saharaclient breaks tempest 2021-02-22 00:41:40 UTC

Internal Links: 1310767

Description Rohan Kanade 2015-12-23 09:18:03 UTC
Description of problem:
Manila tempest tests cannot be run due to invalid import in the test's base class.

Version-Release number of selected component (if applicable):
openstack-manila-1.0.0-2.el7ost.noarch

How reproducible:


Steps to Reproduce:
1. Install "openstack-tempest-liberty" rpm
2. Run command "testr list-tests"
3. Traceback should be similar to (http://pastebin.test.redhat.com/336883)

Actual results:
http://pastebin.test.redhat.com/336883

Expected results:
"testr list-tests" command should list all the Manila tempest tests

Comment 11 Rohan Kanade 2016-02-05 09:09:22 UTC
Any idea when https://bugs.launchpad.net/manila/+bug/1513105 will be fixed in our downstream Manila rpm?

Comment 12 Tom Barron 2016-02-05 12:43:51 UTC
Rohan, I have to sort things out upstream w.r.t. https://bugs.launchpad.net/manila/+bug/1513105 in stable/liberty before we can do the downstream work.  There the proposed backport seems not to be needed to run tempest, so we need to investigate the relevant differences between their tempest setup and what one gets with RHOS 8.  It may turn out that the proposed backport is not needed if we tweak something else.

Comment 13 Luigi Toscano 2016-03-10 08:40:10 UTC
Created attachment 1134759 [details]
Error running testr list-tests

For completeness, the error message mentioned in Description is:

running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
--- import errors ---
Failed to import test module: manila_tempest_tests.tests.api.admin.test_admin_actions
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
    __import__(name)
  File "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/api/admin/test_admin_actions.py", line 20, in <module>
    from manila_tempest_tests.tests.api import base
  File "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/api/base.py", line 23, in <module>
    from tempest.common import isolated_creds  # noqa
ImportError: cannot import name isolated_creds
 

Full log attached.

Comment 15 Ramon Acedo 2016-08-25 11:32:08 UTC
I am facing this issue with the GA release of OSP 9:

[stack@undercloud-1 tempest]$ rpm -q python-manila-tests.noarch
python-manila-tests-2.0.0-5.el7ost.noarch
[stack@undercloud-1 tempest]$ rpm -q openstack-manila
openstack-manila-2.0.0-5.el7ost.noarch
[stack@undercloud-1 tempest]$ testr list-tests
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
/usr/lib/python2.7/site-packages/tempest_lib/__init__.py:28: DeprecationWarning: tempest-lib is deprecated for future bug-fixes and code changes in favor of tempest. Please change your imports from tempest_lib to tempest.lib
  DeprecationWarning)
--- import errors ---
Failed to import test module: manila_tempest_tests.tests.scenario.test_share_basic_ops
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
    __import__(name)
  File "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/scenario/test_share_basic_ops.py", line 19, in <module>
    from tempest.lib.common.utils import test_utils
ImportError: cannot import name test_utils
Non-zero exit code (2) from test listing.

Comment 16 Tom Barron 2016-08-25 16:55:46 UTC
(In reply to Ramon Acedo from comment #15)
> I am facing this issue with the GA release of OSP 9:
> 
> [stack@undercloud-1 tempest]$ rpm -q python-manila-tests.noarch
> python-manila-tests-2.0.0-5.el7ost.noarch
> [stack@undercloud-1 tempest]$ rpm -q openstack-manila
> openstack-manila-2.0.0-5.el7ost.noarch
> [stack@undercloud-1 tempest]$ testr list-tests
> running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
> OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
> OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
> OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
> ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./}
> ${OS_TEST_PATH:-./tempest/test_discover} --list
> /usr/lib/python2.7/site-packages/tempest_lib/__init__.py:28:
> DeprecationWarning: tempest-lib is deprecated for future bug-fixes and code
> changes in favor of tempest. Please change your imports from tempest_lib to
> tempest.lib
>   DeprecationWarning)
> --- import errors ---
> Failed to import test module:
> manila_tempest_tests.tests.scenario.test_share_basic_ops
> 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
>     __import__(name)
>   File
> "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/scenario/
> test_share_basic_ops.py", line 19, in <module>
>     from tempest.lib.common.utils import test_utils
> ImportError: cannot import name test_utils
> Non-zero exit code (2) from test listing.

Ramon, you are seeing a different exception than the one in this BZ, though they both pertain to import errors in tempest with manila.  You have:

> ImportError: cannot import name test_utils

whereas this BZ pertains to

> ImportError: cannot import name isolated_creds

in OSP8.

Please file a new BZ for this issue in OSP9 and record its number here.  Manila QE has remarked that they are not unfamiliar with this OSP9 issue and we'll update that BZ and begin work on the issue there.

Comment 17 Ramon Acedo 2016-08-25 17:05:04 UTC
New BZ with the test_utils import error: https://bugzilla.redhat.com/show_bug.cgi?id=1370240

Comment 18 Tom Barron 2016-08-29 19:27:32 UTC
This issue was verified as fixed in https://bugzilla.redhat.com/show_bug.cgi?id=1358065.

*** This bug has been marked as a duplicate of bug 1358065 ***


Note You need to log in before you can comment on or make changes to this bug.