86420dd2f3
- Resolves: RHEL-53501 adtrustinstance only prints issues in check_inst() and does not log them - Resolves: RHEL-52305 Unconditionally add MS-PAC to global config - Resolves: RHEL-52223 ipa-replica/server-install with softhsm needs to check permission/ownership of /var/lib/softhsm/tokens to avoid install failure - Resolves: RHEL-51937 Include latest fixes in python3-ipatests packages - Resolves: RHEL-50805 ipa-migrate -Z with invalid cert options fails with 'ValueError: option error' - Resolves: RHEL-49805 misleading warning for missing ipa-selinux-nfast package on luna hsm h/w - Resolves: RHEL-49592 'Unable to log in as uid=admin-replica.testrealm.test,ou=people,o=ipaca' during replica install - Resolves: RHEL-4879 RFE - Keep the configured value for the "nsslapd-ignore-time-skew" after a "force-sync" Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
74 lines
2.8 KiB
Diff
74 lines
2.8 KiB
Diff
From f03a96a7b914eb5130552cea626fd28e26b2108d Mon Sep 17 00:00:00 2001
|
|
From: Rob Crittenden <rcritten@redhat.com>
|
|
Date: Mon, 15 Jul 2024 10:21:28 -0400
|
|
Subject: [PATCH] ipatests: Fix usage of token_password_file
|
|
|
|
There were a few hardcoded places where it was set to
|
|
/tmp/token_passwd instead of using the class variable.
|
|
|
|
Don't rely on previous running tests installing the token
|
|
password file so they can be run individually.
|
|
|
|
Fixes: https://pagure.io/freeipa/issue/9603
|
|
|
|
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
|
|
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
|
|
---
|
|
ipatests/test_integration/test_hsm.py | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/ipatests/test_integration/test_hsm.py b/ipatests/test_integration/test_hsm.py
|
|
index 3a33c3bda6d072aa16e361b04ac2d668902bb0e9..64305460a5150dfc28a4ab378ac72cd38987184c 100644
|
|
--- a/ipatests/test_integration/test_hsm.py
|
|
+++ b/ipatests/test_integration/test_hsm.py
|
|
@@ -173,6 +173,9 @@ class BaseHSMTest(IntegrationTest):
|
|
cls.master.run_command(['usermod', 'pkiuser', '-a', '-G', 'ods'])
|
|
|
|
cls.token_name, cls.token_password = get_hsm_token(cls.master)
|
|
+ cls.master.put_file_contents(
|
|
+ cls.token_password_file, cls.token_password
|
|
+ )
|
|
tasks.install_master(
|
|
cls.master, setup_dns=cls.master_with_dns,
|
|
setup_kra=cls.master_with_kra,
|
|
@@ -220,10 +223,6 @@ class TestHSMInstall(BaseHSMTest):
|
|
|
|
def test_hsm_install_replica0_ca_less_install(self):
|
|
check_version(self.master)
|
|
-
|
|
- self.master.put_file_contents(
|
|
- self.token_password_file, self.token_password
|
|
- )
|
|
tasks.install_replica(
|
|
self.master, self.replicas[0], setup_ca=False,
|
|
setup_dns=True,
|
|
@@ -412,7 +411,7 @@ class TestHSMcertRenewal(BaseHSMTest):
|
|
cert = tasks.certutil_fetch_cert(
|
|
self.master,
|
|
paths.PKI_TOMCAT_ALIAS_DIR,
|
|
- '/tmp/token_passwd',
|
|
+ self.token_password_file,
|
|
nickname,
|
|
token_name=self.token_name,
|
|
)
|
|
@@ -428,13 +427,14 @@ class TestHSMcertRenewal(BaseHSMTest):
|
|
status = tasks.wait_for_request(self.master, request_id[0], 120)
|
|
assert status == "MONITORING"
|
|
|
|
- args = ['-L', '-h', self.token_name, '-f', '/tmp/token_passwd']
|
|
+ args = ['-L', '-h', self.token_name, '-f',
|
|
+ self.token_password_file,]
|
|
tasks.run_certutil(self.master, args, paths.PKI_TOMCAT_ALIAS_DIR)
|
|
|
|
cert = tasks.certutil_fetch_cert(
|
|
self.master,
|
|
paths.PKI_TOMCAT_ALIAS_DIR,
|
|
- '/tmp/token_passwd',
|
|
+ self.token_password_file,
|
|
nickname,
|
|
token_name=self.token_name,
|
|
)
|
|
--
|
|
2.45.2
|
|
|