URL: https://github.com/freeipa/freeipa/pull/820 Author: martbab Title: #820: Amend some regressions in backup/restore tests Action: opened
PR body: """ After investigating the backup_restore test failures in CI I found out that most of them were caused by recently introduced changes in 4.5 development and are quite easy to fix. The last one, however, is caused by some bug in Vault and may not be as easy as it seems. https://pagure.io/freeipa/issue/6956 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/820/head:pr820 git checkout pr820
From 131208291ececfec78ae8b0bba2fe7330a61b1a3 Mon Sep 17 00:00:00 2001 From: Martin Babinsky <mbabi...@redhat.com> Date: Thu, 25 May 2017 14:02:10 +0200 Subject: [PATCH 1/2] 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 --- 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 833baed366..2899434b9d 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 From 7b6cc89621e81ca10ed4370480729168e9ae8691 Mon Sep 17 00:00:00 2001 From: Martin Babinsky <mbabi...@redhat.com> Date: Fri, 26 May 2017 12:39:35 +0200 Subject: [PATCH 2/2] Do not delete DS and PKI users during backup/restore tests Since the creation of DS and PKI users is now handled by RPMs and not at runtime in FreeIPA 4.5.x, we should no longer remove them during backup/restore tests. https://pagure.io/freeipa/issue/6956 --- ipatests/test_integration/test_backup_and_restore.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index 2899434b9d..a90d9fbc53 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -165,9 +165,6 @@ def test_full_backup_and_restore_with_removed_users(self): '--uninstall', '-U']) - self.master.run_command(['userdel', constants.DS_USER]) - self.master.run_command(['userdel', constants.PKI_USER]) - homedir = os.path.join(self.master.config.test_dir, 'testuser_homedir') self.master.run_command(['useradd', 'ipatest_user1',
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org