← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1271273] [NEW] Policy testing checks could be simplified in test_v3_filters

 

Public bug reported:

test_v3_filters resets the policy file repeatedly to perform its various
checks.  Usinf the current code, if you do this within a given test more
than once it seems to break, leading to more complex test code.  E.g.:

        # TODO(henry-nash) Ideally the policy setting would happen in the
        # entity for-loop below, using a string substitution of 'plural'.
        # However, that appears to lead to unreliable policy checking - i.e.
        # multiple calls to _set_policy doesn't work properly.

        self._set_policy({"identity:list_users": [],
                          "identity:list_groups": [],
                          "identity:list_projects": [])

        for entity in ['user', 'group', 'project']:
              Do some action that needs the policy above for that type of entity

whereas it would be better to reset the policy every time in the loop.

** Affects: keystone
     Importance: Undecided
         Status: New

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

Title:
  Policy testing checks could be simplified in test_v3_filters

Status in OpenStack Identity (Keystone):
  New

Bug description:
  test_v3_filters resets the policy file repeatedly to perform its
  various checks.  Usinf the current code, if you do this within a given
  test more than once it seems to break, leading to more complex test
  code.  E.g.:

          # TODO(henry-nash) Ideally the policy setting would happen in the
          # entity for-loop below, using a string substitution of 'plural'.
          # However, that appears to lead to unreliable policy checking - i.e.
          # multiple calls to _set_policy doesn't work properly.

          self._set_policy({"identity:list_users": [],
                            "identity:list_groups": [],
                            "identity:list_projects": [])

          for entity in ['user', 'group', 'project']:
                Do some action that needs the policy above for that type of entity

  whereas it would be better to reset the policy every time in the loop.

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


Follow ups

References