Test 'test_publicize_image_unauthorized' is missing a piece

Bug #1153670 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Stuart McLaren
Grizzly
Fix Released
Undecided
Stuart McLaren

Bug Description

If you change

    def test_add_public_image_unauthorized(self):
        rules = {"add_image": '@', "publicize_image": '!'}
        self.set_policy_rules(rules)

to

    def test_add_public_image_unauthorized(self):
        rules = {"add_image": '@'}
        self.set_policy_rules(rules)

the test still passes.

Changed in glance:
assignee: nobody → Stuart McLaren (stuart-mclaren)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/24087
Committed: http://github.com/openstack/glance/commit/42325cb91aeb17215a1704a43b5e1ea4db643bdd
Submitter: Jenkins
Branch: master

commit 42325cb91aeb17215a1704a43b5e1ea4db643bdd
Author: Stuart McLaren <email address hidden>
Date: Mon Mar 11 16:58:52 2013 +0000

    Fix up publicize_image unit test

    The 'test_add_public_image_unauthorized' unit test wasn't checking
    the 'publicize_image' policy as expected.

    Replace it with new tests 'test_add_publicize_image_authorized' and
    'test_add_publicize_image_unauthorized' which perform the check as
    expected and verify both authorized and unauthorized code paths.

    Fixes bug 1153670.

    Change-Id: Ib095763a246df6aa16e1310f25b7a0d442229f1a

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
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.