URL: https://github.com/freeipa/freeipa/pull/958 Author: Rezney Title: #958: [ipatests] - Add caless > cafull tests Action: opened
PR body: """ This PR provides test coverage for caless > cafull conversion. Also covers: https://pagure.io/freeipa/issue/6207 https://pagure.io/freeipa/issue/6226 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/958/head:pr958 git checkout pr958
From 39d44e8cf5d9044ed50888ed6242222c3365aa86 Mon Sep 17 00:00:00 2001 From: Michal Reznik <mrez...@redhat.com> Date: Wed, 2 Aug 2017 16:43:57 +0200 Subject: [PATCH 1/2] test_caless: add server_replica ca-less to ca-full test Add server_replica ca-less to ca-full test as we are currently missing one. Cover Pagure issue: https://pagure.io/freeipa/issue/6207 https://pagure.io/freeipa/issue/7086 --- ipatests/test_integration/test_caless.py | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index c41e0ee3d6..9a29687d8e 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -1507,9 +1507,65 @@ def install(cls, mh): @replica_install_teardown def test_server_replica_install_pkinit(self): + "Install master and replica with PKINIT" + self.create_pkcs12('ca1/replica', filename='replica.p12') self.create_pkcs12('ca1/replica-kdc', filename='replica-kdc.p12') result = self.prepare_replica(pkinit_pkcs12_exists=True, pkinit_pin=_DEFAULT) assert result.returncode == 0 self.verify_installation() + + +class TestServerCALessToCAFull(CALessBase): + num_replicas = 0 + + @classmethod + def install(cls, mh): + super(TestServerCALessToCAFull, cls).install(mh) + + cls.create_pkcs12('ca1/server') + cls.prepare_cacert('ca1') + master = cls.install_server() + assert master.returncode == 0 + + @server_install_teardown + def test_server_ipa_ca_install(self): + "Install CA on master" + + ca = tasks.install_ca(self.master) + assert ca.returncode == 0 + + cert_update = self.master.run_command(['ipa-certupdate']) + assert cert_update.returncode == 0 + + +class TestServerReplicaCALessToCAFull(CALessBase): + num_replicas = 1 + + @classmethod + def install(cls, mh): + super(TestServerReplicaCALessToCAFull, cls).install(mh) + + cls.create_pkcs12('ca1/server') + cls.prepare_cacert('ca1') + + master = cls.install_server() + assert master.returncode == 0 + + @replica_install_teardown + def test_server_replica_ipa_ca_install(self): + "Install CA on master and replica" + + self.create_pkcs12('ca1/replica', filename='replica.p12') + + result = self.prepare_replica() + assert result.returncode == 0 + ca_master = tasks.install_ca(self.master) + assert ca_master.returncode == 0 + cert_update_master = self.master.run_command(['ipa-certupdate']) + assert cert_update_master.returncode == 0 + cert_update_replica = self.replicas[0].run_command(['ipa-certupdate']) + assert cert_update_replica.returncode == 0 + ca_replica = tasks.install_ca(self.replicas[0]) + assert ca_replica.returncode == 0 From 922763698c988c50db271a0ef343f7267927b826 Mon Sep 17 00:00:00 2001 From: Michal Reznik <mrez...@redhat.com> Date: Fri, 4 Aug 2017 09:45:10 +0200 Subject: [PATCH 2/2] test_caless: add replica ca-less to ca-full test (master caless) Add replica ca-less to ca-full test when master stays caless. Cover Pagure issue: https://pagure.io/freeipa/issue/6226 https://pagure.io/freeipa/issue/7086 --- ipatests/test_integration/test_caless.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 9a29687d8e..d173b96278 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -1540,6 +1540,32 @@ def test_server_ipa_ca_install(self): assert cert_update.returncode == 0 +class TestReplicaCALessToCAFull(CALessBase): + num_replicas = 1 + + @classmethod + def install(cls, mh): + super(TestReplicaCALessToCAFull, cls).install(mh) + + cls.create_pkcs12('ca1/server') + cls.prepare_cacert('ca1') + master = cls.install_server() + assert master.returncode == 0 + + @replica_install_teardown + def test_replica_ipa_ca_install(self): + "Install CA on replica (master caless)" + + self.create_pkcs12('ca1/replica', filename='replica.p12') + + result = self.prepare_replica() + assert result.returncode == 0 + ca_replica = tasks.install_ca(self.replicas[0]) + assert ca_replica.returncode == 0 + cert_update_replica = self.replicas[0].run_command(['ipa-certupdate']) + assert cert_update_replica.returncode == 0 + + class TestServerReplicaCALessToCAFull(CALessBase): num_replicas = 1
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org