mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Test for improved Custodia key distribution
The test checks that custodia keys are properly replicated from the source and are successfully distributed amongst peer system upon successful replica installation. Fixes: https://pagure.io/freeipa/issue/7518 Signed-off-by: Nikhil Dehadrai <ndehadra@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
parent
00dceb434d
commit
dcaa62f6a4
@ -660,3 +660,33 @@ class TestSubCAkeyReplication(IntegrationTest):
|
||||
ssl_cmd = ['openssl', 'x509', '-text', '-in', TEST_CRT_FILE]
|
||||
ssl = replica.run_command(ssl_cmd)
|
||||
assert 'Issuer: CN = {}'.format(self.SUBCA) in ssl.stdout_text
|
||||
|
||||
|
||||
class TestReplicaInstallCustodia(IntegrationTest):
|
||||
"""
|
||||
Pagure Reference: https://pagure.io/freeipa/issue/7518
|
||||
"""
|
||||
|
||||
topology = 'line'
|
||||
num_replicas = 2
|
||||
domain_level = DOMAIN_LEVEL_1
|
||||
|
||||
@classmethod
|
||||
def install(cls, mh):
|
||||
tasks.install_master(cls.master, domain_level=cls.domain_level)
|
||||
|
||||
def test_replica_install_for_custodia(self):
|
||||
master = self.master
|
||||
replica1 = self.replicas[0]
|
||||
replica2 = self.replicas[1]
|
||||
|
||||
# Install Replica1 without CA and stop ipa-custodia
|
||||
tasks.install_replica(master, replica1, setup_ca=False)
|
||||
replica1.run_command(['ipactl', 'status'])
|
||||
replica1.run_command(['systemctl', 'stop', 'ipa-custodia'])
|
||||
replica1.run_command(['ipactl', 'status'])
|
||||
|
||||
# Install Replica2 with CA with source as Replica1.
|
||||
tasks.install_replica(replica1, replica2, setup_ca=True)
|
||||
result = replica2.run_command(['ipactl', 'status'])
|
||||
assert 'ipa-custodia Service: RUNNING' in result.stdout_text
|
||||
|
Loading…
Reference in New Issue
Block a user