yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #34073
[Bug 1439951] Re: glance.tests.unit.test_artifacts_plugin_loader unit test failed
** Changed in: glance
Status: Fix Committed => Fix Released
** Changed in: glance
Milestone: None => liberty-1
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1439951
Title:
glance.tests.unit.test_artifacts_plugin_loader unit test failed
Status in OpenStack Image Registry and Delivery Service (Glance):
Fix Released
Bug description:
The unit tests in glance.tests.unit.test_artifacts_plugin_loader was
failed.
# ./run_tests.sh -N glance.tests.unit.test_artifacts_plugin_loader
glance.tests.unit.test_artifacts_plugin_loader.TestArtifactsLoader
test_config_validation FAIL
test_check_function FAIL
test_basic_loader_func OK 0.01
test_load FAIL
Below is the result of test_load() unit test.
======================================================================
FAIL: glance.tests.unit.test_artifacts_plugin_loader.TestArtifactsLoader.test_load
----------------------------------------------------------------------
Traceback (most recent call last):
testtools.testresult.real._StringException: Traceback (most recent call last):
File "/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py", line 67, in test_load
'MyArtifact=%s.v1.artifact:MyArtifact' % self.path]),
File "/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py", line 49, in _setup_loader
pkg_resources.EntryPoint.parse(art) for art in artifacts]
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2366, in parse
return cls(res['name'], res['module'], attrs, extras, dist)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2289, in __init__
raise ValueError("Invalid module name", module_name)
ValueError: ('Invalid module name', '.home.jenkins.glance.glance.tests.unit.test_artifacts_plugin_loader')
-----------------------------------------------------------------------
other results were same to the test_load() test.
The reason why is that I performs unit tests as jenkins user.
Therefore my working directory is /home/jenkins/glance/ .
when getting the path for _setup_loader()
It gets full path of file which means,
path = os.path.splitext(__file__)[0].replace('/', '.')
The full path is raised ValueError for module validation check.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1439951/+subscriptions
References