Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTG-TESTS: backport sync_files_provider() from b9c1d7d667d49080c27… #7253

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading