URL: https://github.com/freeipa/freeipa/pull/966
Author: tomaskrizek
 Title: #966: [ipa-4-5] tests: fix external_ca test suite failing due to 
missing SKI
Action: opened

PR body:
"""
external_ca test suite is failing during installation due to
missing SKI extension.

https://pagure.io/freeipa/issue/7099

Original PR: #962
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/966/head:pr966
git checkout pr966
From c28ad8f5cbf3a87c678ab7efe2b6605425cf7310 Mon Sep 17 00:00:00 2001
From: Michal Reznik <mrez...@redhat.com>
Date: Wed, 9 Aug 2017 15:37:28 +0200
Subject: [PATCH] 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
---
 ipatests/test_integration/test_external_ca.py | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_integration/test_external_ca.py b/ipatests/test_integration/test_external_ca.py
index 38b4840b59..7fc89cc949 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 <http://www.gnu.org/licenses/>.
 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 @@ def test_external_ca(self):
             '-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 @@ def test_external_ca(self):
             '-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(
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to