test_caless: add server_replica ca-less to ca-full test

Add server_replica ca-less to ca-full test as we are currently missing
one. Cover Pagure issue: https://pagure.io/freeipa/issue/6207

https://pagure.io/freeipa/issue/7086

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
Michal Reznik 2017-08-10 15:09:39 +02:00 committed by Tomas Krizek
parent 4caabb140e
commit 7a5b1cc140
No known key found for this signature in database
GPG Key ID: 22A2A94B5E49415A

View File

@ -1493,6 +1493,7 @@ class TestCertInstall(CALessBase):
class TestPKINIT(CALessBase):
"""Install master and replica with PKINIT"""
num_replicas = 1
@classmethod
@ -1513,3 +1514,41 @@ class TestPKINIT(CALessBase):
pkinit_pin=_DEFAULT)
assert result.returncode == 0
self.verify_installation()
class TestServerReplicaCALessToCAFull(CALessBase):
"""
Test server and replica caless to cafull scenario:
Master (caless) / replica (caless) >> master (ca) / replica (ca)
"""
num_replicas = 1
def test_install_caless_server_replica(self):
"""Install CA-less master and replica"""
self.create_pkcs12('ca1/server')
self.prepare_cacert('ca1')
master = self.install_server()
assert master.returncode == 0
self.create_pkcs12('ca1/replica', filename='replica.p12')
replica = self.prepare_replica()
assert replica.returncode == 0
def test_server_ipa_ca_install(self):
"""Install CA on master"""
ca_master = tasks.install_ca(self.master)
assert ca_master.returncode == 0
cert_update_master = self.master.run_command(['ipa-certupdate'])
assert cert_update_master.returncode == 0
cert_update_replica = self.replicas[0].run_command(['ipa-certupdate'])
assert cert_update_replica.returncode == 0
def test_replica_ipa_ca_install(self):
"""Install CA on replica"""
ca_replica = tasks.install_ca(self.replicas[0])
assert ca_replica.returncode == 0