Tests fail if keystone is running on local host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Fix Released
|
Medium
|
Louis Taylor |
Bug Description
If keystone is running on the local machine some tests fail, eg:
=======
FAIL: tests.test_
tags: worker-2
-------
Traceback (most recent call last):
File "/mnt/ubuntu/
return func(*args, **keywargs)
File "tests/
glance_
File "/mnt/ubuntu/
self.
File "/mnt/ubuntu/
mismatch_error = self._matchHelp
File "/mnt/ubuntu/
mismatch = matcher.
File "/mnt/ubuntu/
mismatch = self.exception_
File "/mnt/ubuntu/
mismatch = matcher.
File "/mnt/ubuntu/
reraise(
File "/mnt/ubuntu/
result = matchee()
File "/mnt/ubuntu/
return self._callable_
File "glanceclient/
force_
File "glanceclient/
force_
File "glanceclient/
token = args.os_auth_token or ks_session.
File "/mnt/ubuntu/
return (self.get_
File "/mnt/ubuntu/
return auth.get_
File "/mnt/ubuntu/
token = self.get_
File "/mnt/ubuntu/
return self.get_
File "/mnt/ubuntu/
self.auth_ref = self.get_
File "/mnt/ubuntu/
authenticat
File "/mnt/ubuntu/
return self.request(url, 'POST', **kwargs)
File "/mnt/ubuntu/
return func(*args, **kwargs)
File "/mnt/ubuntu/
raise exceptions.
Unauthorized: Could not find user: username (Disable debug mode to suppress these details.) (HTTP 401)
... terminating glance client
Schema is not a valid JSON object.
Schema is not a valid JSON object.
Ran 332 (+330) tests in 3.565s (+3.472s)
FAILED (id=72, failures=2)
error: testr failed (1)
The tests define a mix of urls for image and keystone (all on port 5000):
DEFAULT_IMAGE_URL = 'http://
DEFAULT_USERNAME = 'username'
DEFAULT_PASSWORD = 'password'
DEFAULT_TENANT_ID = 'tenant_id'
DEFAULT_TENANT_NAME = 'tenant_name'
DEFAULT_PROJECT_ID = '0123456789'
DEFAULT_
DEFAULT_
DEFAULT_V2_AUTH_URL = 'http://
DEFAULT_V3_AUTH_URL = 'http://
DEFAULT_AUTH_TOKEN = ' 3bcc3d3a03f44e3
TEST_SERVICE_URL = 'http://
and explicitly rely on keystone not running:
@mock.
@mock.
def test_password_
# We will get a Connection Refused because there is no keystone. <<<<<
# Make sure we are actually prompted.
Ideally tests should be isolated from the test environment as much as possible.
Changed in python-glanceclient: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
importance: | Critical → Medium |
Changed in python-glanceclient: | |
status: | Fix Committed → Fix Released |
Review, since gerritbot doesn't like me: https:/ /review. openstack. org/#/c/ 160340/