mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Tests: fix wait_for_replication task
DS changed a format of replication status attribute. Now it is with prefix "Error (x)" where x is the error code. Both formats were kept to allow tests run on older and new versions of DS. Reviewed-By: Milan Kubik <mkubik@redhat.com>
This commit is contained in:
parent
4c84341b8b
commit
ad1a5551d5
@ -1067,8 +1067,15 @@ def wait_for_replication(ldap, timeout=30):
|
||||
filter='(objectclass=nsds5replicationagreement)',
|
||||
attrs_list=[status_attr, progress_attr])
|
||||
log.debug('Replication agreements: \n%s', _entries_to_ldif(entries))
|
||||
if any(not e.single_value[status_attr].startswith('0 ')
|
||||
for e in entries):
|
||||
if any(
|
||||
not (
|
||||
# older DS format
|
||||
e.single_value[status_attr].startswith('0 ') or
|
||||
# newer DS format
|
||||
e.single_value[status_attr].startswith('Error (0) ')
|
||||
)
|
||||
for e in entries
|
||||
):
|
||||
log.error('Replication error')
|
||||
continue
|
||||
if any(e.single_value[progress_attr] == 'TRUE' for e in entries):
|
||||
|
Loading…
Reference in New Issue
Block a user