From 4caabb140e31218c72846877da0c985c6a178d7a Mon Sep 17 00:00:00 2001 From: Michal Reznik Date: Aug 11 2017 08:54:05 +0000 Subject: tests: fix external_ca test suite failing due to missing SKI external_ca test suite is failing during installation due to missing SKI extension. https://pagure.io/freeipa/issue/7099 Reviewed-By: Fraser Tweedale Reviewed-By: Tomas Krizek --- diff --git a/ipatests/test_integration/test_external_ca.py b/ipatests/test_integration/test_external_ca.py index 38b4840..7fc89cc 100644 --- a/ipatests/test_integration/test_external_ca.py +++ b/ipatests/test_integration/test_external_ca.py @@ -17,11 +17,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . import os +import base64 from ipatests.pytest_plugins.integration import tasks from ipatests.test_integration.base import IntegrationTest +EXTERNAL_CA_KEY_ID = base64.b64encode(os.urandom(64)) +IPA_CA_KEY_ID = base64.b64encode(os.urandom(64)) + + class TestExternalCA(IntegrationTest): """ Test of FreeIPA server installation with exernal CA @@ -71,8 +76,9 @@ class TestExternalCA(IntegrationTest): '-m', '0', '-v', '60', '-z', noisefile, - '-2', '-1', '-5' - ], stdin_text='5\n9\nn\ny\n10\ny\n5\n6\n7\n9\nn\n') + '-2', '-1', '-5', '--extSKID' + ], stdin_text='5\n9\nn\ny\n10\ny\n{}\nn\n5\n6\n7\n9\nn\n' + ''.format(EXTERNAL_CA_KEY_ID)) # Sign IPA cert request using the external CA self.master.run_command([ @@ -82,11 +88,12 @@ class TestExternalCA(IntegrationTest): '-c', 'external', '-m', '1', '-v', '60', - '-2', '-1', '-5', + '-2', '-1', '-3', '--extSKID', '-i', '/root/ipa.csr', '-o', external_cert_file, '-a' - ], stdin_text='0\n1\n5\n9\ny\ny\n\ny\n5\n6\n7\n9\nn\n') + ], stdin_text='0\n1\n5\n9\ny\ny\n\ny\ny\n{}\n-1\n\nn\n{}\nn\n' + ''.format(EXTERNAL_CA_KEY_ID, IPA_CA_KEY_ID)) # Export external CA file self.master.run_command(