yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #20061
[Bug 1348063] Re: Testing of results of entity lists does not check that the command part of the url is in the 'self' link
** Changed in: keystone
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1348063
Title:
Testing of results of entity lists does not check that the command
part of the url is in the 'self' link
Status in OpenStack Identity (Keystone):
Fix Released
Bug description:
Methods assertValidListResponse and consequently assertValidListLinks
of the unit test RestfulTestCase (test_v3.py) don't have any
information about request, so the check of 'self' url in links
collection is very general:
self.assertThat(links['self'],
matchers.StartsWith('http://localhost'))
To implement a proper fix of the bug 1195037 ("Self" link in v3
collections omits any url filters) we need to pass some request data,
at least the command part of the url, for example:
def assertValidListLinks(self, links, command=None)
def assertValidListResponse(self, resp, key, entity_validator, ref=None,
expected_length=None, keys_to_check=None,
command=None)
as result a proper check would be possible:
if command:
self.assertThat(links['self'], matchers.EndsWith(command))
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1348063/+subscriptions
References