From 4f4835a724c18f71318296609293a27efee6e308 Mon Sep 17 00:00:00 2001 From: Anuja More Date: Mon, 4 Jun 2018 14:09:16 +0530 Subject: [PATCH] Test for ipa-replica-install fails with PIN error for CA-less env. Signed-off-by: Anuja More Reviewed-By: Florence Blanc-Renaud Reviewed-By: Aleksei Slaikovskii Reviewed-By: Stanislav Laznicka --- ipatests/test_integration/test_caless.py | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 1666b1ce4..974694a6e 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -1181,6 +1181,41 @@ class TestReplicaInstall(CALessBase): if self.domain_level > DOMAIN_LEVEL_0: self.verify_installation() + @replica_install_teardown + def test_certs_with_no_password(self): + # related to https://pagure.io/freeipa/issue/7274 + + self.create_pkcs12('ca1/replica', filename='http.p12', + password='') + self.create_pkcs12('ca1/replica', filename='dirsrv.p12', + password='') + self.prepare_cacert('ca1') + + self.prepare_replica(http_pkcs12='http.p12', + dirsrv_pkcs12='dirsrv.p12', + http_pin='', dirsrv_pin='') + if self.domain_level > DOMAIN_LEVEL_0: + self.verify_installation() + + @replica_install_teardown + def test_certs_with_no_password_interactive(self): + # related to https://pagure.io/freeipa/issue/7274 + + self.create_pkcs12('ca1/replica', filename='http.p12', + password='') + self.create_pkcs12('ca1/replica', filename='dirsrv.p12', + password='') + self.prepare_cacert('ca1') + stdin_text = '\n\nyes' + + result = self.prepare_replica(http_pkcs12='http.p12', + dirsrv_pkcs12='dirsrv.p12', + http_pin=None, dirsrv_pin=None, + unattended=False, stdin_text=stdin_text) + assert result.returncode == 0 + if self.domain_level > DOMAIN_LEVEL_0: + self.verify_installation() + class TestClientInstall(CALessBase): num_clients = 1