I have tried following steps to perform sanity over glare tempest plugin.
$ git clone https://github.com/openstack/glare
$ cd glare and tox -e py27
$ source .tox/py27/bin/activate
$ pip install tempest
$ mkdir /tmp/foobar
# Create tempest workspace
$ cd /tmp/foobar
(py27) [chkumar246@ironman foobar]$ tempest list-plugins
+---------------------+------------------------------------------------+
| Name | EntryPoint |
+---------------------+------------------------------------------------+
| glare_tempest_tests | glare_tempest_plugin.plugin:GlareTempestPlugin |
+---------------------+------------------------------------------------+
(py27) [chkumar246@ironman foobar]$ ls -a
. ..
(py27) [chkumar246@ironman foobar]$ tempest init --debug
2017-09-21 18:45:03.568 13568 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf
2017-09-21 18:45:03.581 13568 WARNING oslo_config.generator [-] "catalog_type" is missing a help string
(py27) [chkumar246@ironman foobar]$ ls
etc logs tempest_lock
(py27) [chkumar246@ironman foobar]$ ls -a
. .. etc logs tempest_lock .testr.conf .testrepository
(py27) [chkumar246@ironman foobar]$ tempest run -l
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
${PYTHON:-python} -m subunit.run discover -t /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/test_discover --list
--- import errors ---
Failed to import test module: glare_tempest_plugin.tests.api.test_blobs
Traceback (most recent call last):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/tmp/glare/glare_tempest_plugin/tests/api/test_blobs.py", line 20, in <module>
from glare_tempest_plugin.tests.api import base
File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
from glare_tempest_plugin import clients
File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
class Manager(object):
File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
'identity_admin')):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
identity_version=identity_version, **params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
**params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
http_timeout=http_timeout)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
super(KeystoneAuthProvider, self).__init__(credentials, scope)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.
Failed to import test module: glare_tempest_plugin.tests.api.test_list_artifact
Traceback (most recent call last):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/tmp/glare/glare_tempest_plugin/tests/api/test_list_artifact.py", line 19, in <module>
from glare_tempest_plugin.tests.api import base
File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
from glare_tempest_plugin import clients
File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
class Manager(object):
File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
'identity_admin')):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
identity_version=identity_version, **params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
**params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
http_timeout=http_timeout)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
super(KeystoneAuthProvider, self).__init__(credentials, scope)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/commands/__init__.py", line 143, in execute
result = self.run()
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/commands/list_tests.py", line 47, in run
cmd.setUp()
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/testcommand.py", line 234, in setUp
self.test_ids = self.list_tests()
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/testcommand.py", line 312, in list_tests
% (run_proc.returncode))
> /tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/testcommand.py(312)list_tests()
-> % (run_proc.returncode))
(Pdb) ^C(py27) [chkumar246@ironman foobar]$
(py27) [chkumar246@ironman foobar]$
(py27) [chkumar246@ironman foobar]$ 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} \
${PYTHON:-python} -m subunit.run discover -t /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/test_discover --list
--- import errors ---
Failed to import test module: glare_tempest_plugin.tests.api.test_blobs
Traceback (most recent call last):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/tmp/glare/glare_tempest_plugin/tests/api/test_blobs.py", line 20, in <module>
from glare_tempest_plugin.tests.api import base
File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
from glare_tempest_plugin import clients
File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
class Manager(object):
File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
'identity_admin')):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
identity_version=identity_version, **params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
**params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
http_timeout=http_timeout)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
super(KeystoneAuthProvider, self).__init__(credentials, scope)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.
Failed to import test module: glare_tempest_plugin.tests.api.test_list_artifact
Traceback (most recent call last):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/tmp/glare/glare_tempest_plugin/tests/api/test_list_artifact.py", line 19, in <module>
from glare_tempest_plugin.tests.api import base
File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
from glare_tempest_plugin import clients
File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
class Manager(object):
File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
'identity_admin')):
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
identity_version=identity_version, **params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
**params)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
http_timeout=http_timeout)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
super(KeystoneAuthProvider, self).__init__(credentials, scope)
File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.
Non-zero exit code (2) from test listing.
(py27) [chkumar246@ironman foobar]$
testr list-tests and tempest run -l failed to list glare tempest tests and tox -e py27 is also failing with RuntimeError: No executable found for "strace" command.
One more issue we found that we are copying tempest.conf in gate: https://github.com/openstack/glare/blob/master/glare_tempest_plugin/contrib/post_test_hook.sh#L23
We need to generate tempest.conf in upstream gates itself.
Please have a look.
Fix proposed to branch: master /review. openstack. org/506327
Review: https:/