mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-26 07:00:07 -05:00
tests: Create a method that cleans all ipa certs
Upon uninstallation IPA does not remove certs from the system, see https://fedorahosted.org/freeipa/ticket/4639 for details. This causes installation failures in several tests. The workaround is to manually remove certs from all certificate databases used by IPA after each server uninstallation Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
1 parent
38ad864342
commit
c0e16aa3b9
1 file changed
+11
@@ -54,6 +54,17 @@ def get_replica_prepare_stdin(cert_passwords=()):
|
||||
return '\n'.join(lines + [''])
|
||||
|
||||
|
||||
def ipa_certs_cleanup(host):
|
||||
host.run_command(['certutil', '-d', paths.NSS_DB_DIR, '-D',
|
||||
'-n', 'External CA cert'],
|
||||
raiseonerr=False)
|
||||
# A workaround for https://fedorahosted.org/freeipa/ticket/4639
|
||||
result = host.run_command(['certutil', '-L', '-d',
|
||||
paths.HTTPD_ALIAS_DIR])
|
||||
for rawcert in result.stdout_text.split('\n')[4: -1]:
|
||||
cert = rawcert.split(' ')[0]
|
||||
host.run_command(['certutil', '-D', '-d', paths.HTTPD_ALIAS_DIR,
|
||||
'-n', cert])
|
||||
class CALessBase(IntegrationTest):
|
||||
@classmethod
|
||||
def install(cls, mh):
|
||||
|
||||
Reference in new issue
Block a user