On 08/06/2016 12:32 PM, Petr Vobornik wrote:
> usage of ipautil.run in  get_pem methond of ca-less tests was not
> refactored when the ipautil.run was refactored in
> 099cf98307d4b2f0ace5d5e28754f264808bf59d
> 
> This results in failure of all CA-less test (probably).
> 
> Patch is untested though.
> 
> https://fedorahosted.org/freeipa/ticket/6177
> 

Original patch doesn't fix the issue. Main culprit is that output is
captured only if capture_output=True is passed to ipautil.run

Previous patch therefore just replaced old usage to new usage.

Attaching fixed path.
-- 
Petr Vobornik
From 3d66938af86c7108e0a20daf0437e0c3577bad3d Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Sat, 6 Aug 2016 12:25:57 +0200
Subject: [PATCH] ca-less tests: fix getting cert in pem format from nssdb

usage of ipautil.run in  get_pem methond of ca-less tests was not
refactored when the ipautil.run was refactored in
099cf98307d4b2f0ace5d5e28754f264808bf59d

This results in failure of all CA-less test.

https://fedorahosted.org/freeipa/ticket/6177
---
 ipatests/test_integration/test_caless.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py
index 667e2b3b1d91f967b32fabdb7e472886bbdf79d7..c9d90331bd2658b7164e6a9e70f07bbc8960ff07 100644
--- a/ipatests/test_integration/test_caless.py
+++ b/ipatests/test_integration/test_caless.py
@@ -279,10 +279,10 @@ class CALessBase(IntegrationTest):
 
     @classmethod
     def get_pem(cls, nickname):
-        pem_cert, _stderr, _returncode = ipautil.run(
+        result = ipautil.run(
             ['certutil', '-L', '-d', 'nssdb', '-n', nickname, '-a'],
-            cwd=cls.cert_dir)
-        return pem_cert
+            cwd=cls.cert_dir, capture_output=True)
+        return result.output
 
     def verify_installation(self):
         """Verify CA cert PEM file and LDAP entry created by install
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to