Skip to content

Commit

Permalink
ipatests: Fixes for test_ipahealthcheck_ipansschainvalidation testcases.
Browse files Browse the repository at this point in the history
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 <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
  • Loading branch information
menonsudhir authored and flo-renaud committed Mar 25, 2024
1 parent 64861a0 commit adf95dc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ipatests/test_integration/test_ipahealthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -2766,17 +2766,18 @@ def remove_server_cert(self):
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",
]
)
Expand All @@ -2795,15 +2796,15 @@ def remove_server_cert(self):
[
"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",
]
Expand Down

0 comments on commit adf95dc

Please sign in to comment.