URL: https://github.com/freeipa/freeipa/pull/2234 Author: tiran Title: #2234: Disable DL0 specific tests Action: opened
PR body: """ Disable tests that use domain level 0. Fail early to catch additional tests that depend on DL0. See: https://pagure.io/freeipa/issue/7669 Signed-off-by: Christian Heimes <chei...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/2234/head:pr2234 git checkout pr2234
From 4f9642eb109f9ff76a3682fb99fc97ed96e3af64 Mon Sep 17 00:00:00 2001 From: Christian Heimes <chei...@redhat.com> Date: Thu, 9 Aug 2018 09:25:52 +0200 Subject: [PATCH] Disable DL0 specific tests Disable tests that use domain level 0. Fail early to catch additional tests that depend on DL0. See: https://pagure.io/freeipa/issue/7669 Signed-off-by: Christian Heimes <chei...@redhat.com> --- ipatests/pytest_ipa/integration/tasks.py | 15 ++++++++++- ipatests/test_integration/test_caless.py | 27 ++++++++++--------- .../test_replica_promotion.py | 5 ++++ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index a50b55d7d5..4ffb20e053 100644 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -32,6 +32,7 @@ import dns from ldif import LDIFWriter +import pytest from SSSDConfig import SSSDConfig from six import StringIO @@ -287,6 +288,8 @@ def install_master(host, setup_dns=True, setup_kra=False, setup_adtrust=False, stdin_text=None, raiseonerr=True): if domain_level is None: domain_level = host.config.domain_level + if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") setup_server_logs_collecting(host) apply_common_fixes(host) fix_apache_semaphores(host) @@ -397,6 +400,8 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False, raiseonerr=True): if domain_level is None: domain_level = domainlevel(master) + if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") apply_common_fixes(replica) setup_server_logs_collecting(replica) allow_sync_ptr(master) @@ -709,6 +714,7 @@ def connect_replica(master, replica, domain_level=None): if domain_level is None: domain_level = master.config.domain_level if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") replica.run_command(['ipa-replica-manage', 'connect', master.hostname]) else: kinit_admin(master) @@ -723,7 +729,10 @@ def disconnect_replica(master, replica, domain_level=None): if domain_level is None: domain_level = master.config.domain_level if domain_level == DOMAIN_LEVEL_0: - replica.run_command(['ipa-replica-manage', 'disconnect', master.hostname]) + pytest.fail("Domain level 0 is not supported anymore") + replica.run_command([ + 'ipa-replica-manage', 'disconnect', master.hostname + ]) else: kinit_admin(master) master.run_command(["ipa", "topologysegment-del", DOMAIN_SUFFIX_NAME, @@ -1222,6 +1231,8 @@ def ipa_restore(master, backup_path): def install_kra(host, domain_level=None, first_instance=False, raiseonerr=True): if domain_level is None: domain_level = domainlevel(host) + if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") command = ["ipa-kra-install", "-U", "-p", host.config.dirman_password] if domain_level == DOMAIN_LEVEL_0 and not first_instance: replica_file = get_replica_filename(host) @@ -1237,6 +1248,8 @@ def install_ca(host, domain_level=None, first_instance=False, external_ca=False, cert_files=None, raiseonerr=True): if domain_level is None: domain_level = domainlevel(host) + if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") command = ["ipa-ca-install", "-U", "-p", host.config.dirman_password, "-P", 'admin', "-w", host.config.admin_password] if domain_level == DOMAIN_LEVEL_0 and not first_instance: diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 2449b3c875..5ffed8ad83 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -39,7 +39,7 @@ from ipatests.pytest_ipa.integration import tasks from ipatests.create_external_ca import ExternalCA from ipatests.pytest_ipa.integration import create_caless_pki -from ipalib.constants import DOMAIN_LEVEL_0 +from ipalib.constants import DOMAIN_LEVEL_0, DOMAIN_LEVEL_1 if six.PY3: unicode = str @@ -252,6 +252,8 @@ def prepare_replica(self, _replica_number=0, replica=None, master=None, Return value is the remote ipa-replica-prepare command """ + if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") if replica is None: replica = self.replicas[_replica_number] if master is None: @@ -315,6 +317,7 @@ def prepare_replica(self, _replica_number=0, replica=None, master=None, extra_args.extend(['--pkinit-pin', dirsrv_pin]) if domain_level == DOMAIN_LEVEL_0: + pytest.fail("Domain level 0 is not supported anymore") result = tasks.replica_prepare(master, replica, extra_args=extra_args, raiseonerr=False, @@ -1072,7 +1075,7 @@ def test_valid_certs(self): result = self.prepare_replica(http_pkcs12='server.p12', dirsrv_pkcs12='server.p12') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1085,7 +1088,7 @@ def test_wildcard_http(self): result = self.prepare_replica(http_pkcs12='http.p12', dirsrv_pkcs12='dirsrv.p12') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1098,7 +1101,7 @@ def test_wildcard_ds(self): result = self.prepare_replica(http_pkcs12='http.p12', dirsrv_pkcs12='dirsrv.p12') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1111,7 +1114,7 @@ def test_http_san(self): result = self.prepare_replica(http_pkcs12='http.p12', dirsrv_pkcs12='dirsrv.p12') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1124,7 +1127,7 @@ def test_ds_san(self): result = self.prepare_replica(http_pkcs12='http.p12', dirsrv_pkcs12='dirsrv.p12') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1139,7 +1142,7 @@ def test_interactive_missing_http_pkcs_password(self): result = self.prepare_replica(http_pin=None, unattended=False, stdin_text=stdin_text) assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1154,7 +1157,7 @@ def test_interactive_missing_ds_pkcs_password(self): result = self.prepare_replica(dirsrv_pin=None, unattended=False, stdin_text=stdin_text) assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1168,7 +1171,7 @@ def test_no_http_password(self): dirsrv_pkcs12='dirsrv.p12', http_pin='') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1182,7 +1185,7 @@ def test_no_ds_password(self): dirsrv_pkcs12='dirsrv.p12', dirsrv_pin='') assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1198,7 +1201,7 @@ def test_certs_with_no_password(self): self.prepare_replica(http_pkcs12='http.p12', dirsrv_pkcs12='dirsrv.p12', http_pin='', dirsrv_pin='') - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() @replica_install_teardown @@ -1217,7 +1220,7 @@ def test_certs_with_no_password_interactive(self): http_pin=None, dirsrv_pin=None, unattended=False, stdin_text=stdin_text) assert result.returncode == 0 - if self.domain_level > DOMAIN_LEVEL_0: + if self.domain_level >= DOMAIN_LEVEL_1: self.verify_installation() diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 1eade8330e..03c34359a9 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -40,6 +40,7 @@ def test_kra_install_master(self): assert(found > 0), result2.stdout_text +@pytest.mark.skip(reason="Domain level 0 is not supported anymore") class TestReplicaPromotionLevel0(ReplicaPromotionBase): topology = 'star' @@ -87,6 +88,7 @@ def test_backup_restore(self): assert(found2 > 0), result2.stdout_text +@pytest.mark.skip(reason="Domain level 0 is not supported anymore") @pytest.mark.xfail(reason="Ticket N 6274", strict=True) class TestKRAInstall(IntegrationTest): """ @@ -126,6 +128,7 @@ def test_kra_install_without_replica_file(self): tasks.install_kra(replica2) +@pytest.mark.skip(reason="Domain level 0 is not supported anymore") @pytest.mark.xfail(reason="Ticket N 6274", strict=True) class TestCAInstall(IntegrationTest): topology = 'star' @@ -205,6 +208,7 @@ def test_one_command_installation(self): '-U']) +@pytest.mark.skip(reason="Domain level 0 is not supported anymore") @pytest.mark.xfail(reason="Ticket N 6274", strict=True) class TestReplicaManageCommands(IntegrationTest): topology = "star" @@ -372,6 +376,7 @@ def test_replica_uninstallation_prohibited(self): '-U', '--ignore-topology-disconnect']) +@pytest.mark.skip(reason="Domain level 0 is not supported anymore") @pytest.mark.xfail(reason="Ticket N 6274", strict=True) class TestOldReplicaWorksAfterDomainUpgrade(IntegrationTest): topology = 'star'
_______________________________________________ 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://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/freeipa-devel@lists.fedorahosted.org/message/OUC42ERPO7QPDD3OZNESXBEEGR3K34J2/