yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #70809
[Bug 1746747] [NEW] Clean up UUID usage in tests
Public bug reported:
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
** Affects: nova
Importance: Low
Status: Confirmed
** Tags: low-hanging-fruit
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1746747
Title:
Clean up UUID usage in tests
Status in OpenStack Compute (nova):
Confirmed
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1746747/+subscriptions