URL: https://github.com/freeipa/freeipa/pull/4948
Author: rcritten
 Title: #4948: [Backport][ipa-4-8] ipatests: fix test_replica_promotion.py
Action: opened

PR body:
"""
This PR was opened automatically because PR #4926 was pushed to master and 
backport to ipa-4-8 is required.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4948/head:pr4948
git checkout pr4948
From 2490c4f78b6064ae0a16fff55fb6344bcb1952b8 Mon Sep 17 00:00:00 2001
From: Florence Blanc-Renaud <f...@redhat.com>
Date: Thu, 16 Jul 2020 18:21:09 +0200
Subject: [PATCH 1/2] ipatests: fix TestUnprivilegedUserPermissions

A new test has been added to TestUnprivilegedUserPermissions that
duplicates the steps done in the precedent test. As the tests
are usually run sequentially, no need to duplicate.

Fixes: https://pagure.io/freeipa/issue/8413
---
 ipatests/test_integration/test_replica_promotion.py | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py
index 5774b2ab6a..5b866df783 100644
--- a/ipatests/test_integration/test_replica_promotion.py
+++ b/ipatests/test_integration/test_replica_promotion.py
@@ -197,19 +197,6 @@ def test_replica_promotion_after_adding_to_admin_group(self):
                                       '-U'])
 
     def test_sssd_config_allows_ipaapi_access_to_ifp(self):
-        self.master.run_command(['ipa', 'group-add-member', 'admins',
-                                 '--users=%s' % self.username])
-
-        # Configure firewall first
-        Firewall(self.replicas[0]).enable_services(["freeipa-ldap",
-                                                    "freeipa-ldaps"])
-        self.replicas[0].run_command(['ipa-replica-install',
-                                      '-P', self.username,
-                                      '-p', self.new_password,
-                                      '-n', self.master.domain.name,
-                                      '-r', self.master.domain.realm,
-                                      '-U'])
-
         sssd_config_allows_ipaapi_access_to_ifp(self.replicas[0])
 
 

From 7df169d0bd3fd234243a942cb2df44cf133325f1 Mon Sep 17 00:00:00 2001
From: Florence Blanc-Renaud <f...@redhat.com>
Date: Thu, 16 Jul 2020 18:45:52 +0200
Subject: [PATCH 2/2] ipatests: Fix TestReplicaPromotionLevel1

A new test was added to TestReplicaPromotionLevel1 but was run
after the replica uninstallation. As the new test checks
the content of /etc/sssd/sssd.conf on the replica, merge it with the
previous test, when the replica is still installed.

Fixes: https://pagure.io/freeipa/issue/8414
---
 ipatests/test_integration/test_replica_promotion.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py
index 5b866df783..82117054fd 100644
--- a/ipatests/test_integration/test_replica_promotion.py
+++ b/ipatests/test_integration/test_replica_promotion.py
@@ -115,15 +115,9 @@ def test_one_command_installation(self):
         result = self.replicas[0].run_command(['ipa-pkinit-manage', 'status'])
         assert "PKINIT is enabled" in result.stdout_text
 
-    @replicas_cleanup
-    def test_sssd_config_allows_ipaapi_access_to_ifp(self):
-        """Verify that the sssd configuration allows the ipaapi user to
-        access ifp
-
-        Test for ticket 8403.
-        """
-        for replica in self.replicas:
-            sssd_config_allows_ipaapi_access_to_ifp(replica)
+        # Verify that the sssd configuration allows the ipaapi user to
+        # access ifp
+        sssd_config_allows_ipaapi_access_to_ifp(self.replicas[0])
 
 
 class TestUnprivilegedUserPermissions(IntegrationTest):
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to