From 2624cf2e4cc4b4b560fe64688ee55160f9d8fb80 Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Thu, 25 May 2017 14:02:10 +0200 Subject: [PATCH] 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 --- ipatests/test_integration/test_backup_and_restore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index 833baed36..2899434b9 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -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