← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Reviewed:  https://review.opendev.org/c/openstack/glance/+/797721
Committed: https://opendev.org/openstack/glance/commit/7c1cd438a0a9fe5cababc9ff0164ce7844c98abf
Submitter: "Zuul (22348)"
Branch:    master

commit 7c1cd438a0a9fe5cababc9ff0164ce7844c98abf
Author: Dan Smith <dansmith@xxxxxxxxxx>
Date:   Wed Jun 23 10:08:07 2021 -0700

    Fix broken test_update_queued_image_with_hidden
    
    This fixes the test to behave the way we expect. It was failing to
    do the update because it was using an image the requester did not
    own, and asserting the found behavior of 403. However, the intent
    here is to allow it to be updated. So, this uses the proper image and
    asserts the proper behavior.
    
    Change-Id: I71afe6a877485c8f92e67dcf32bb475c1a1a42a3
    Closes-Bug: #1933360


** Changed in: glance
       Status: In Progress => Fix Released

-- 
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:
  Fix Released

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


References