Public bug reported: This was uncovered by a patch implementing policy-in-code for Glance: https://review.opendev.org/#/c/693129/
The TestTasksDeserializer class creates a glance.v2.tasks.RequestDeserializer but doesn't pass it a policy_enforcer. As a result, RequestDeserializer uses a real policy enforcer. The default policy in code that's checked by the RequestDeserializer is "tasks_api_access: role:admin", and with that policy in place, all the unit test requests fail. Need to pass the unit test class the FakePolicyEnforcer so that the deserialization can be tested. ** Affects: glance Importance: High Assignee: Brian Rosmaita (brian-rosmaita) Status: Triaged ** Changed in: glance Status: New => Triaged ** Changed in: glance Importance: Undecided => High ** Changed in: glance Assignee: (unassigned) => Brian Rosmaita (brian-rosmaita) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1852354 Title: TestTasksDeserializer class not using FakePolicyEnforcer Status in Glance: Triaged Bug description: This was uncovered by a patch implementing policy-in-code for Glance: https://review.opendev.org/#/c/693129/ The TestTasksDeserializer class creates a glance.v2.tasks.RequestDeserializer but doesn't pass it a policy_enforcer. As a result, RequestDeserializer uses a real policy enforcer. The default policy in code that's checked by the RequestDeserializer is "tasks_api_access: role:admin", and with that policy in place, all the unit test requests fail. Need to pass the unit test class the FakePolicyEnforcer so that the deserialization can be tested. To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1852354/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp