Clean up UUID usage in tests

Bug #1746747 reported by Ed Leafe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Low
Alexey Stupnikov

Bug Description

Bug #1606647 [0] was created because there were many places in our tests, where the test authors entered values for UUID fields that were not UUID-like, such as 'fake-id'. Since oslo.versionedobjects now enforces UUID validity in any field declared to be a UUIDField, we had to update these tests to use proper UUIDs.

During that process, it was clear that there were many other places where UUIDs were either invalid, or hard-coded to values such as '33333333-aaaa-bbbb-cccc-333333333333', which, while valid, is not a best practice for testing. Instead, tests should use nova.tests.uuidsentinel instead, which will create a named unique UUID for each UUID required for the tests.

As a start, a list of many of these cases is in the reviews for the bug fix patches for #1606647:
https://review.openstack.org/#/c/531479/
https://review.openstack.org/#/c/539254/

As this bug is being filed after the end of Feature Freeze for Queens, and is not critical for Queens, it should be corrected in Rocky at the earliest.

[0] https://launchpad.net/bugs/1606647

Changed in nova:
assignee: nobody → Russell Tweed (russell-tweed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/550238

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Russell Tweed (russell-tweed) wrote :

Going to have to abandon this one; virtually all of the changes from comments in reviews 531479/539254 cause assertion errors in the various tests. May revisit in future but will leave unassigned for now.

Changed in nova:
assignee: Russell Tweed (russell-tweed) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Russell Tweed (<email address hidden>) on branch: master
Review: https://review.openstack.org/550238

Changed in nova:
status: In Progress → New
Changed in nova:
status: New → Triaged
Changed in nova:
assignee: nobody → Alexey Stupnikov (astupnikov)
Revision history for this message
Alexey Stupnikov (astupnikov) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/803226

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/803363

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by "Alexey Stupnikov <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/nova/+/803226

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Alexey Stupnikov <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/nova/+/803363

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.