URL: https://github.com/freeipa/freeipa/pull/820 Author: martbab Title: #820: Amend some regressions in backup/restore tests Action: synchronized
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 e9ca893c5b5785c0e00a0373b43b1a5db3cf1237 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 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index 2899434b9d..bb648d71b7 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -23,7 +23,6 @@ import re import contextlib -from ipaplatform.constants import constants from ipapython.ipa_log_manager import log_mgr from ipapython.dn import DN from ipatests.test_integration.base import IntegrationTest @@ -165,9 +164,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