URL: https://github.com/freeipa/freeipa/pull/962
Author: Rezney
 Title: #962: 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
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/962/head:pr962
git checkout pr962
From 6f349b2e8f713132cd166e86d828c6f5c95cb1bc 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..97e541b7a6 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
 
 
+AKI_ID = base64.b64encode(os.urandom(64))
+SKI_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(AKI_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(AKI_ID, SKI_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