From 9ee8657c2a76a418e56baee50b07f6ec089e622e Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Wed, 4 Mar 2020 10:55:10 +0100 Subject: [PATCH] ipatests: fix TestSubCAkeyReplication The test is using the output of openssl to compare the SubCA issuer name with the expected value. Depending on the version of openssl, the issuer can be displayed differently (with/without space around the = character). On RHEL 7.x, there is no space by default while on Fedora the space is used. Calling openssl with -nameopt space_eq forces a consistent output, always adding space around =. Reviewed-By: Sudhir Menon --- ipatests/test_integration/test_replica_promotion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 16b2cb34b..c06e06177 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -601,7 +601,8 @@ class TestSubCAkeyReplication(IntegrationTest): status = replica.run_command(status_cmd) assert 'State MONITORING, stuck: no' in status.stdout_text - ssl_cmd = ['openssl', 'x509', '-text', '-in', TEST_CRT_FILE] + ssl_cmd = ['openssl', 'x509', '-text', '-in', TEST_CRT_FILE, + '-nameopt', 'space_eq'] ssl = replica.run_command(ssl_cmd) assert 'Issuer: CN = {}'.format(self.SUBCA_MASTER) in ssl.stdout_text