From a1aa66dc59b55fef641dcf0539de0d3602f6a8a0 Mon Sep 17 00:00:00 2001 From: Sudhir Menon Date: Wed, 20 Mar 2024 14:29:46 +0530 Subject: [PATCH] ipatests: Fixes for test_ipahealthcheck_ipansschainvalidation testcases. Currently the test is using IPA_NSSDB_PWDFILE_TXT which is /etc/ipa/nssdb/pwdfile.txt which causes error in STIG mode. [root@master slapd-TESTRELM-TEST]# certutil -M -n 'TESTRELM.TEST IPA CA' -t ',,' -d . -f /etc/ipa/nssdb/pwdfile.txt Incorrect password/PIN entered. Hence modified the test to include paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE/pwd.txt. Signed-off-by: Sudhir Menon Reviewed-By: Florence Blanc-Renaud Reviewed-By: Rob Crittenden --- ipatests/test_integration/test_ipahealthcheck.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py index 7323b073273bd95d7b62d19fd5afe03edb2a21da..7e8f7da3664a88f927ff80ae222780156676c40b 100644 --- a/ipatests/test_integration/test_ipahealthcheck.py +++ b/ipatests/test_integration/test_ipahealthcheck.py @@ -2766,17 +2766,18 @@ class TestIpaHealthCheckWithExternalCA(IntegrationTest): Fixture to remove Server cert and revert the change. """ instance = realm_to_serverid(self.master.domain.realm) + instance_dir = paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % instance self.master.run_command( [ "certutil", "-L", "-d", - paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % instance, + instance_dir, "-n", "Server-Cert", "-a", "-o", - paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % instance + instance_dir + "/Server-Cert.pem", ] ) @@ -2795,15 +2796,15 @@ class TestIpaHealthCheckWithExternalCA(IntegrationTest): [ "certutil", "-d", - paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % instance, + instance_dir, "-A", "-i", - paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % instance + instance_dir + "/Server-Cert.pem", "-t", "u,u,u", "-f", - paths.IPA_NSSDB_PWDFILE_TXT, + "%s/pwdfile.txt" % instance_dir, "-n", "Server-Cert", ] -- 2.44.0