| Summary: | Missing scenario tests for python-saharaclient breaks tempest | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Luigi Toscano <ltoscano> |
| Component: | openstack-sahara | Assignee: | Sergey Gotliv <sgotliv> |
| Status: | CLOSED ERRATA | QA Contact: | Luigi Toscano <ltoscano> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 (Liberty) | CC: | dmellado, jschluet, kbasil, matt, mimccune, pkshiras, sgotliv, tkammer, yeylon |
| Target Milestone: | ga | Keywords: | AutomationBlocker |
| Target Release: | 8.0 (Liberty) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openstack-sahara-3.0.1-4.el7ost | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-04-07 21:29:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Missing detail from the summary: information about Tempest Plugin interface: http://docs.openstack.org/developer/tempest/plugin.html The Sahara tests which implements the Tempest Plugin interface are now packaged in the separate python-sahara-tests (sub)package. After installing it, test discovery can proceed:
$ 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
tempest.api.baremetal.admin.test_api_discovery.TestApiDiscovery.test_api_versions[id-a3c27e94-f56c-42c4-8600-d6790650b9c5]
tempest.api.baremetal.admin.test_api_discovery.TestApiDiscovery.test_default_version[id-896283a6-488e-4f31-af78-6614286cbe0d]
[...]
[...]
sahara.tests.tempest.scenario.data_processing.client_tests.test_plugins.PluginsTest.test_plugins[data_processing]
Also:
$ tempest list-plugins
+-------------------------------+----------------------------------------------------------------------------------+
| Name | EntryPoint |
+-------------------------------+----------------------------------------------------------------------------------+
| sahara_clients_scenario_tests | sahara.tests.tempest.scenario.data_processing.plugin:SaharaClientsScenarioPlugin |
+-------------------------------+----------------------------------------------------------------------------------+
Verified on:
openstack-sahara-api-3.0.1-4.el7ost.noarch
openstack-sahara-common-3.0.1-4.el7ost.noarch
openstack-sahara-engine-3.0.1-4.el7ost.noarch
python-sahara-3.0.1-4.el7ost.noarch
python-sahara-tests-3.0.1-4.el7ost.noarch
openstack-tempest-liberty-20160317.1.el7ost.noarch
python-tempest-lib-0.13.0-3.el7ost.noarch
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. https://rhn.redhat.com/errata/RHEA-2016-0603.html |
Description of problem: In the Liberty lifecycle some tempest-style tests (namely: tempest tests for python-saharaclient python clients) have have migrated to use the Tempest Plugin interface, i.e. tests are automagically discovered thanks to a special entry point exported through setup.py. See also: The problem is that the code for those tests (tests.tempest.scenario.data_processing.plugin) is not available in the package, but the entry point is exported in setup.py (see /usr/lib/python2.7/site-packages/sahara-3.0.1-py2.7.egg-info/entry_points.txt, which comes from openstack-sahara-common) and the listing of tests breaks. Please note that Manila (which also had more tests migrated to tempest format) ships the tests in the python-manila package. The tests should either be packaged (or the entry point removed, but then it means using a virtualenv where to install sahara to run them). Version-Release number of selected component (if applicable): openstack-tempest-liberty-20160126.1.el7ost.noarch openstack-sahara-api-3.0.1-1.el7ost.noarch openstack-sahara-common-3.0.1-1.el7ost.noarch openstack-sahara-engine-3.0.1-1.el7ost.noarch How reproducible: Install openstack-tempest cd /usr/share/openstack-tempest-liberty testr list-tests Actual results: # 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 No handlers could be found for logger "tempest.test_discover.plugins" --- import errors --- Failed to call load_tests: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 136, in loadTestsFromModule return load_tests(self, tests, pattern) File "tempest/test_discover/test_discover.py", line 27, in load_tests ext_plugins = plugins.TempestTestPluginManager() File "/usr/lib/python2.7/site-packages/tempest_lib/common/utils/misc.py", line 30, in getinstance instances[cls] = cls() File "tempest/test_discover/plugins.py", line 77, in __init__ on_load_failure_callback=self.failure_hook) File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 92, in __init__ verify_requirements) File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 170, in _load_plugins self._on_load_failure_callback(self, ep, err) File "tempest/test_discover/plugins.py", line 82, in failure_hook raise err ImportError: No module named tests.tempest.scenario.data_processing.plugin