Skip to content

Commit

Permalink
ipatests: fix tasks.wait_for_replication method
Browse files Browse the repository at this point in the history
With the fix for https://pagure.io/freeipa/issue/9171, the
method entry.single_value['nsds5replicaupdateinprogress'] now
returns a Boolean instead of a string "TRUE"/"FALSE".

The method tasks.wait_for_replication needs to be fixed so that
it properly detects when replication is not done.

Fixes: https://pagure.io/freeipa/issue/9530

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
  • Loading branch information
flo-renaud committed Feb 14, 2024
1 parent e5579fb commit 44a7624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipatests/pytest_ipa/integration/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ def wait_for_replication(ldap, timeout=30,
statuses = [entry.single_value[status_attr] for entry in entries]
wrong_statuses = [s for s in statuses
if not re.match(target_status_re, s)]
if any(e.single_value[progress_attr] == 'TRUE' for e in entries):
if any(e.single_value[progress_attr] for e in entries):
msg = 'Replication not finished'
logger.debug(msg)
elif wrong_statuses:
Expand Down

0 comments on commit 44a7624

Please sign in to comment.