Skip to content

Commit

Permalink
INTG-TESTS: backport sync_files_provider() from b9c1d7d
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-tikhonov committed Mar 21, 2024
1 parent d06b4a3 commit 02d0701
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/tests/intg/test_files_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,19 @@ def sssd_id_sync(name):
return res, groups


def sync_files_provider(name=None):
"""
Tests with files provider can fail because files provider did not yet
finish updating its cache. Polling for presents of the canary user makes
sure that we wait until the cache is updated.
"""
if name is None:
name = CANARY["name"]

ret = poll_canary(call_sssd_getpwnam, name)
assert ret


# Helper functions
def user_generator(seqnum):
return dict(name='user%d' % seqnum,
Expand Down
1 change: 1 addition & 0 deletions src/tests/intg/test_pam_responder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import pytest

from .test_files_provider import sync_files_provider
from intg.util import unindent

LDAP_BASE_DN = "dc=example,dc=com"
Expand Down

0 comments on commit 02d0701

Please sign in to comment.