Testing of results of entity lists does not check that the command part of the url is in the 'self' link

Bug #1348063 reported by Alexey Miroshkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Alexey Miroshkin

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))

Changed in keystone:
assignee: nobody → Alexey Miroshkin (amirosh)
Henry Nash (henry-nash)
Changed in keystone:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in keystone:
status: Confirmed → In Progress
Changed in keystone:
status: In Progress → Fix Committed
Henry Nash (henry-nash)
Changed in keystone:
milestone: none → juno-3
Revision history for this message
Dolph Mathews (dolph) wrote :

Henry: I try to save "Wishlist" for user-facing features, and use Low for dev-impact only things like refactors and small test coverage improvements.

Alexey: Was there a fix committed for this somewhere? Did it cite this bug number? Can you to link it here, or paste the git hash?

Changed in keystone:
status: Fix Committed → Incomplete
Revision history for this message
Alexey Miroshkin (amirosh) wrote :

Dolph: Yes, it was reviewed and committed https://review.openstack.org/#/c/109290/
The commit message contains Closes-Bug: #1348063

Revision history for this message
Dolph Mathews (dolph) wrote :

Ah, the bot must not have picked it up due to the period at the end. Thanks!

Changed in keystone:
status: Incomplete → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: juno-3 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.