URL: https://github.com/freeipa/freeipa/pull/4926 Author: flo-renaud Title: #4926: ipatests: fix test_replica_promotion.py Action: opened
PR body: """ ### 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: 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 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/4926/head:pr4926 git checkout pr4926
From db3824baac252f126c3950f4ac77634e6f4de456 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <[email protected]> Date: Thu, 16 Jul 2020 18:21:09 +0200 Subject: [PATCH 1/3] 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 29386f059198cc38daaabcfc0b20f91ba1eec673 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <[email protected]> Date: Thu, 16 Jul 2020 18:45:52 +0200 Subject: [PATCH 2/3] 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): From c1d412672bccc1302f54cecb7c208034285c96bf Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <[email protected]> Date: Thu, 16 Jul 2020 19:03:21 +0200 Subject: [PATCH 3/3] temp commit, please remove before push --- .freeipa-pr-ci.yaml | 2 +- ipatests/prci_definitions/temp_commit.yaml | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml index abcf8c5b63..8065669008 120000 --- a/.freeipa-pr-ci.yaml +++ b/.freeipa-pr-ci.yaml @@ -1 +1 @@ -ipatests/prci_definitions/gating.yaml \ No newline at end of file +ipatests/prci_definitions/temp_commit.yaml \ No newline at end of file diff --git a/ipatests/prci_definitions/temp_commit.yaml b/ipatests/prci_definitions/temp_commit.yaml index e337068145..3807bd2c2d 100644 --- a/ipatests/prci_definitions/temp_commit.yaml +++ b/ipatests/prci_definitions/temp_commit.yaml @@ -61,14 +61,26 @@ jobs: timeout: 1800 topology: *build - fedora-latest/temp_commit: + fedora-latest/test_replica_promotion_TestReplicaPromotionLevel1: requires: [fedora-latest/build] priority: 50 job: class: RunPytest args: build_url: '{fedora-latest/build_url}' - test_suite: test_integration/test_REPLACEME.py + test_suite: test_integration/test_replica_promotion.py::TestReplicaPromotionLevel1 template: *ci-master-latest - timeout: 3600 - topology: *master_1repl_1client + timeout: 7200 + topology: *master_1repl + + fedora-latest/test_replica_promotion_TestUnprivilegedUserPermissions: + requires: [fedora-latest/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-latest/build_url}' + test_suite: test_integration/test_replica_promotion.py::TestUnprivilegedUserPermissions + template: *ci-master-latest + timeout: 7200 + topology: *master_1repl
_______________________________________________ FreeIPA-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected]
