← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1933360] [NEW] Test (and enforcement?) for os_hidden mutability on queued images is wrong

 

Public bug reported:

The test
glance.tests.unit.v2.test_images_resource.TestImagesController.test_update_queued_image_with_hidden
seems to be looking to confirm that queued images cannot be marked as
hidden. However, if that was the case, it should be checking for
BadRequest (or similar) and not Forbidden. Currently it appears that the
authorization "everything is immutable if not the owner" layer is what
is triggering the Forbidden response.

If we want to assert that os_hidden cannot be modified for queued
images, we need to do that (as it does not appear to actually be
enforced anywhere). In that case, the test needs to be modified to check
for the proper return code as well.

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1933360

Title:
  Test (and enforcement?) for os_hidden mutability on queued images is
  wrong

Status in Glance:
  New

Bug description:
  The test
  glance.tests.unit.v2.test_images_resource.TestImagesController.test_update_queued_image_with_hidden
  seems to be looking to confirm that queued images cannot be marked as
  hidden. However, if that was the case, it should be checking for
  BadRequest (or similar) and not Forbidden. Currently it appears that
  the authorization "everything is immutable if not the owner" layer is
  what is triggering the Forbidden response.

  If we want to assert that os_hidden cannot be modified for queued
  images, we need to do that (as it does not appear to actually be
  enforced anywhere). In that case, the test needs to be modified to
  check for the proper return code as well.

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


Follow ups