URL: https://github.com/freeipa/freeipa/pull/5228 Author: menonsudhir Title: #5228: ipatests: Test for IPATrustDomainsCheck with external trust to AD Action: opened
PR body: """ This testcase checks that when external trust is configured between IPA and AD subdomain, IPATrustDomainsCheck doesnot display ERROR. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/5228/head:pr5228 git checkout pr5228
From 4e8be73370e41ced01463d7e14bd0124b4c5f070 Mon Sep 17 00:00:00 2001 From: Sudhir Menon <sume...@redhat.com> Date: Thu, 5 Nov 2020 22:51:10 +0530 Subject: [PATCH 1/2] ipatests: Test for IPATrustDomainsCheck with external trust to AD This testcase checks that when external trust is configured between IPA and AD subdomain, IPATrustDomainsCheck doesnot display ERROR Signed-off-by: Sudhir Menon <sume...@redhat.com> --- .../test_integration/test_ipahealthcheck.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py index 6217718d965..8b5d0b5981a 100644 --- a/ipatests/test_integration/test_ipahealthcheck.py +++ b/ipatests/test_integration/test_ipahealthcheck.py @@ -1170,6 +1170,7 @@ class TestIpaHealthCheckWithADtrust(IntegrationTest): """ topology = "line" num_ad_domains = 1 + num_ad_subdomains = 1 @classmethod def install(cls, mh): @@ -1283,6 +1284,32 @@ def test_ipahealthcheck_trust_agent_member_check(self): assert check["result"] == "SUCCESS" assert check["kw"]["key"] == self.master.hostname + def test_ipahealthcheck_with_external_ad_trust(self): + """ + This testcase checks that when external trust is configured + between IPA and AD subdomain, IPATrustDomainsCheck + doesnot display ERROR + """ + error_msg = ( + "{sssctl} {key} reports mismatch: sssd domains {sssd_domains} " + "trust domains {trust_domains}" + ) + tasks.establish_trust_with_ad( + self.master, self.ad_subdomain, + extra_args=['--range-type', 'ipa-ad-trust', '--external=True']) + returncode, data = run_healthcheck( + self.master, + "ipahealthcheck.ipa.trust" + "IPATrustDomainsCheck", + ) + assert returncode == 0 + for check in data: + assert check["result"] == "SUCCESS" + assert check["kw"]["key"] == 'domain-list' + assert check["kw"]["sssctl"] == '/usr/bin/sssctl' + assert check["kw"]["sssd_domains"] == self.master.domain.name + assert check["kw"]["trust_domains"] == self.ad_subdomain + assert check["kw"]["msg"] != error_msg @pytest.fixture def modify_permissions(): From 8a2f49b79b97d2032dfcea5eac762816e2df7de5 Mon Sep 17 00:00:00 2001 From: Sudhir Menon <sume...@redhat.com> Date: Thu, 5 Nov 2020 22:56:10 +0530 Subject: [PATCH 2/2] Temp Commit Signed-off-by: Sudhir Menon <sume...@redhat.com> --- .freeipa-pr-ci.yaml | 2 +- ipatests/prci_definitions/temp_commit.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml index abcf8c5b634..80656690080 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 ef2e4bfa905..89bd0d6795f 100644 --- a/ipatests/prci_definitions/temp_commit.yaml +++ b/ipatests/prci_definitions/temp_commit.yaml @@ -65,10 +65,10 @@ jobs: requires: [fedora-latest/build] priority: 50 job: - class: RunPytest + class: RunADTests args: build_url: '{fedora-latest/build_url}' - test_suite: test_integration/test_REPLACEME.py + test_suite: test_integration/test_ipahealthcheck.py::TestIpaHealthCheckWithADtrust template: *ci-master-latest - timeout: 3600 - topology: *master_1repl_1client + timeout: 4800 + topology: *ad_master
_______________________________________________ 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