← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1839853] [NEW] Misuse of nova.objects.base.obj_equal_prims in tests

 

Public bug reported:

There are some tests, mostly related to BuildRequest objects, that are
calling nova.objects.base.obj_equal_prims which does not assert
anything, it only returns True or False - the test code itself must
assert the expected result of the obj_equal_prims method.

https://github.com/openstack/nova/blob/ab34c941be28f3486cd2699af8d9237e9edac351/nova/tests/functional/db/test_build_request.py

https://github.com/openstack/nova/blob/d89579a66ac38fd1e30cea55306e6e7b69bab5b9/nova/tests/unit/objects/test_build_request.py

** Affects: nova
     Importance: Medium
         Status: Confirmed


** Tags: low-hanging-fruit testing

** Changed in: nova
       Status: New => Confirmed

** Tags added: testing

** Changed in: nova
   Importance: Undecided => Medium

-- 
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/1839853

Title:
  Misuse of nova.objects.base.obj_equal_prims in tests

Status in OpenStack Compute (nova):
  Confirmed

Bug description:
  There are some tests, mostly related to BuildRequest objects, that are
  calling nova.objects.base.obj_equal_prims which does not assert
  anything, it only returns True or False - the test code itself must
  assert the expected result of the obj_equal_prims method.

  https://github.com/openstack/nova/blob/ab34c941be28f3486cd2699af8d9237e9edac351/nova/tests/functional/db/test_build_request.py

  https://github.com/openstack/nova/blob/d89579a66ac38fd1e30cea55306e6e7b69bab5b9/nova/tests/unit/objects/test_build_request.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1839853/+subscriptions


Follow ups