URL: https://github.com/freeipa/freeipa/pull/4302 Author: mrizwan93 Title: #4302: ipatest:Test if getcert creates cacert file with -F option Action: opened
PR body: """ It took longer to create the cacert file in older version. restarting the certmonger service creates the file at the location specified by -F option. This fix is to check that cacert file creates immediately after certificate goes into MONITORING state. related: https://pagure.io/freeipa/issue/8105 Signed-off-by: Mohammad Rizwan Yusuf <myu...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/4302/head:pr4302 git checkout pr4302
From c425d6add6f98f4b6657edf86a6604aa6fd2c40c Mon Sep 17 00:00:00 2001 From: Mohammad Rizwan Yusuf <myu...@redhat.com> Date: Wed, 4 Mar 2020 15:57:10 +0530 Subject: [PATCH] Test if getcert creates cacert file with -F option It took longer to create the cacert file in older version. restarting the certmonger service creates the file at the location specified by -F option. This fix is to check that cacert file creates immediately after certificate goes into MONITORING state. related: https://pagure.io/freeipa/issue/8105 Signed-off-by: Mohammad Rizwan Yusuf <myu...@redhat.com> --- .../test_integration/test_installation.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py index bb4a83c5db..8de2188c24 100644 --- a/ipatests/test_integration/test_installation.py +++ b/ipatests/test_integration/test_installation.py @@ -1208,3 +1208,36 @@ def test_replica_install_against_server(self): self.replicas[0].hostname], stdin_text=dirman_password) assert self.replicas[0].hostname not in cmd.stdout_text + + +class TestInstallMasterClient(IntegrationTest): + num_clients = 1 + + @classmethod + def install(cls, mh): + tasks.install_master(cls.master) + tasks.install_client(cls.master, cls.clients[0]) + + def test_cacert_file_appear_with_option_F(self): + """Test if getcert creates cacert file with -F option + + It took longer to create the cacert file in older version. + restarting the certmonger service creates the file at the location + specified by -F option. This fix is to check that cacert file + creates immediately after certificate goes into MONITORING state. + + related: https://pagure.io/freeipa/issue/8105 + """ + cmd_arg = ['ipa-getcert request', + '-f', '/etc/pki/tls/certs/test.pem', + '-k', '/etc/pki/tls/private/test.key', + '-K', 'test/`hostname`', '-F', + '/etc/pki/tls/test.CA'] + result = self.clients[0].run_command([cmd_arg]) + request_id = re.findall(r'\d+', result.stdout_text) + + # check if certificate is in MONITORING state + status = wait_for_request(self.master, request_id[0], 50) + assert status == "MONITORING" + + self.clients[0].run_command(['ls', '-l', '/etc/pki/tls/test.CA'])
_______________________________________________ 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