Skip to content

Commit

Permalink
Fix call to super()._find_keystone_v3_group
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Young committed Oct 24, 2023
1 parent 590a17d commit dc3e9d3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions zaza/openstack/charm_tests/keystone/tests_ldap_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import tenacity
import contextlib
from keystoneauth1.exceptions.http import NotFound as http_NotFound
import logging
import zaza.openstack.charm_tests.keystone.tests as ks_tests
import zaza.openstack.charm_tests.tempest.tests as tempest_tests
import zaza.charm_lifecycle.utils as lifecycle_utils
Expand Down Expand Up @@ -106,13 +107,21 @@ def _get_ldap_config(self):
reraise=True, stop=tenacity.stop_after_attempt(5),
retry=tenacity.retry_if_exception_type(http_NotFound))
def _find_keystone_v3_group(self, group, domain):
super()._find_keystone_v3_group(group, domain)
logging.info('Looking for group: {}'.format(group))
try:
return super()._find_keystone_v3_group(group, domain)
except AttributeError:
raise http_NotFound

@tenacity.retry(wait=tenacity.wait_exponential(multiplier=2, max=60),
reraise=True, stop=tenacity.stop_after_attempt(5),
retry=tenacity.retry_if_exception_type(http_NotFound))
def _find_keystone_v3_user(username, domain, group=None):
super()._find_keystone_v3_user(username, domain, group=group)
def _find_keystone_v3_user(self, username, domain, group=None):
logging.info('Looking for user: {}'.format(username))
try:
return super()._find_keystone_v3_user(username, domain, group=group)
except AttributeError:
raise http_NotFound


class KeystoneTempestTestK8S(tempest_tests.TempestTestScaleK8SBase):
Expand Down

0 comments on commit dc3e9d3

Please sign in to comment.