mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Test for ipa-ca-install on replica
Test on replica for ipa-ca-install with options --no-host-dns,--skip-schema-check,done changes in ipatests/pytest_ipa/integration/tasks.py because wants to pass few arguments to install_ca method Signed-off-by: Jayesh <jgarg@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
parent
bfc998eae2
commit
ad3bf5042d
9
ipatests/pytest_ipa/integration/tasks.py
Normal file → Executable file
9
ipatests/pytest_ipa/integration/tasks.py
Normal file → Executable file
@ -1461,13 +1461,18 @@ def install_kra(host, domain_level=None, first_instance=False, raiseonerr=True):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def install_ca(host, domain_level=None, first_instance=False,
|
def install_ca(
|
||||||
external_ca=False, cert_files=None, raiseonerr=True):
|
host, domain_level=None, first_instance=False, external_ca=False,
|
||||||
|
cert_files=None, raiseonerr=True, extra_args=()
|
||||||
|
):
|
||||||
if domain_level is None:
|
if domain_level is None:
|
||||||
domain_level = domainlevel(host)
|
domain_level = domainlevel(host)
|
||||||
check_domain_level(domain_level)
|
check_domain_level(domain_level)
|
||||||
command = ["ipa-ca-install", "-U", "-p", host.config.dirman_password,
|
command = ["ipa-ca-install", "-U", "-p", host.config.dirman_password,
|
||||||
"-P", 'admin', "-w", host.config.admin_password]
|
"-P", 'admin', "-w", host.config.admin_password]
|
||||||
|
if not isinstance(extra_args, (tuple, list)):
|
||||||
|
raise TypeError("extra_args must be tuple or list")
|
||||||
|
command.extend(extra_args)
|
||||||
# First step of ipa-ca-install --external-ca
|
# First step of ipa-ca-install --external-ca
|
||||||
if external_ca:
|
if external_ca:
|
||||||
command.append('--external-ca')
|
command.append('--external-ca')
|
||||||
|
@ -227,6 +227,34 @@ class TestInstallWithCA2(InstallTestBase2):
|
|||||||
super(TestInstallWithCA2, self).test_replica2_ipa_kra_install()
|
super(TestInstallWithCA2, self).test_replica2_ipa_kra_install()
|
||||||
|
|
||||||
|
|
||||||
|
class TestInstallCA(IntegrationTest):
|
||||||
|
"""
|
||||||
|
Tests for CA installation on a replica
|
||||||
|
"""
|
||||||
|
|
||||||
|
num_replicas = 2
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def install(cls, mh):
|
||||||
|
tasks.install_master(cls.master, setup_dns=False)
|
||||||
|
|
||||||
|
def test_replica_ca_install_with_no_host_dns(self):
|
||||||
|
"""
|
||||||
|
Test for ipa-ca-install --no-host-dns on a replica
|
||||||
|
"""
|
||||||
|
|
||||||
|
tasks.install_replica(self.master, self.replicas[0], setup_ca=False)
|
||||||
|
tasks.install_ca(self.replicas[0], extra_args=["--no-host-dns"])
|
||||||
|
|
||||||
|
def test_replica_ca_install_with_skip_schema_check(self):
|
||||||
|
"""
|
||||||
|
Test for ipa-ca-install --skip-schema-check on a replica
|
||||||
|
"""
|
||||||
|
|
||||||
|
tasks.install_replica(self.master, self.replicas[1], setup_ca=False)
|
||||||
|
tasks.install_ca(self.replicas[1], extra_args=["--skip-schema-check"])
|
||||||
|
|
||||||
|
|
||||||
class TestInstallWithCA_KRA1(InstallTestBase1):
|
class TestInstallWithCA_KRA1(InstallTestBase1):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user