test_backup_restore: do not fail on missing KrbLastSuccessfulAuth

Since FreeIPA 4.5.1 now sets 'Disable last successful auth' option by
default (see https://pagure.io/freeipa/issue/5313), the
'KrbLastSuccessfulAuth' may not always be present on the user entry. The
restored entry checker in backup/restore suite should consider this.

https://pagure.io/freeipa/issue/6956

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Martin Babinsky
2017-05-30 13:31:28 +02:00
committed by Martin Basti
parent ab71cd5a16
commit 2624cf2e4c
@@ -58,7 +58,7 @@ def check_admin_in_ldap(host):
assert entry.dn == user_dn
assert entry['uid'] == ['admin']
del entry['krbLastSuccessfulAuth']
entry.pop('krbLastSuccessfulAuth', None)
return entry