summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2017-02-20 15:17:11 +0100
committerMartin Basti <mbasti@redhat.com>2017-03-01 15:55:45 +0100
commit612ea7f66e102c57c2b213eff99ad8f1c91e59a5 (patch)
treebed2d6a4aec9a0d1553908ec22ca131ca296f40f /ipatests
parent23cebe1356bbf84ddfde2a622a795061c4924edf (diff)
downloadfreeipa-612ea7f66e102c57c2b213eff99ad8f1c91e59a5.tar.gz
freeipa-612ea7f66e102c57c2b213eff99ad8f1c91e59a5.tar.xz
freeipa-612ea7f66e102c57c2b213eff99ad8f1c91e59a5.zip
Provide basic integration tests for built-in AD trust installer
A couple of tests were added to server/replica install integration suite to test AD trust install w/ various combinations of other optional components. https://fedorahosted.org/freeipa/ticket/6630 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_integration/tasks.py15
-rw-r--r--ipatests/test_integration/test_installation.py49
2 files changed, 59 insertions, 5 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 95234506d..6620d12c6 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -249,9 +249,9 @@ def enable_replication_debugging(host):
stdin_text=logging_ldif)
-def install_master(host, setup_dns=True, setup_kra=False, extra_args=(),
- domain_level=None, unattended=True, stdin_text=None,
- raiseonerr=True):
+def install_master(host, setup_dns=True, setup_kra=False, setup_adtrust=False,
+ extra_args=(), domain_level=None, unattended=True,
+ stdin_text=None, raiseonerr=True):
if domain_level is None:
domain_level = host.config.domain_level
setup_server_logs_collecting(host)
@@ -275,6 +275,8 @@ def install_master(host, setup_dns=True, setup_kra=False, extra_args=(),
'--forwarder', host.config.dns_forwarder,
'--auto-reverse'
])
+ if setup_adtrust:
+ args.append('--setup-adtrust')
args.extend(extra_args)
result = host.run_command(args, raiseonerr=raiseonerr,
@@ -343,8 +345,9 @@ def replica_prepare(master, replica, extra_args=(),
def install_replica(master, replica, setup_ca=True, setup_dns=False,
- setup_kra=False, extra_args=(), domain_level=None,
- unattended=True, stdin_text=None, raiseonerr=True):
+ setup_kra=False, setup_adtrust=False, extra_args=(),
+ domain_level=None, unattended=True, stdin_text=None,
+ raiseonerr=True):
if domain_level is None:
domain_level = domainlevel(master)
apply_common_fixes(replica)
@@ -367,6 +370,8 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False,
'--setup-dns',
'--forwarder', replica.config.dns_forwarder
])
+ if setup_adtrust:
+ args.append('--setup-adtrust')
if master_authoritative_for_client_domain(master, replica):
args.extend(['--ip-address', replica.ip])
diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py
index 0929f1323..f3e9ebac1 100644
--- a/ipatests/test_integration/test_installation.py
+++ b/ipatests/test_integration/test_installation.py
@@ -84,6 +84,29 @@ class InstallTestBase2(IntegrationTest):
tasks.install_kra(self.replicas[2])
+class ADTrustInstallTestBase(IntegrationTest):
+ """
+ Base test for builtin AD trust installation im combination with other
+ components
+ """
+ num_replicas = 2
+ topology = 'star'
+
+ @classmethod
+ def install(cls, mh):
+ tasks.install_master(cls.master, setup_dns=False)
+
+ def install_replica(self, replica, **kwargs):
+ tasks.install_replica(self.master, replica, setup_adtrust=True,
+ **kwargs)
+
+ def test_replica0_only_adtrust(self):
+ self.install_replica(self.replicas[0], setup_ca=False)
+
+ def test_replica1_all_components_adtrust(self):
+ self.install_replica(self.replicas[1], setup_ca=True)
+
+
##
# Master X Replicas installation tests
##
@@ -213,6 +236,32 @@ class TestInstallWithCA_KRA_DNS2(InstallTestBase2):
tasks.install_master(cls.master, setup_dns=True, setup_kra=True)
+class TestADTrustInstall(ADTrustInstallTestBase):
+ """
+ Tests built-in AD trust installation in various combinations (see the base
+ class for more details) against plain IPA master (no DNS, no KRA, no AD
+ trust)
+ """
+ pass
+
+
+class TestADTrustInstallWithDNS_KRA_ADTrust(ADTrustInstallTestBase):
+ """
+ Tests built-in AD trust installation in various combinations (see the base
+ class for more details) against fully equipped (DNS, CA, KRA, ADtrust)
+ master. Additional two test cases were added to test interplay including
+ KRA installer
+ """
+
+ @classmethod
+ def install(cls, mh):
+ tasks.install_master(cls.master, setup_dns=True, setup_kra=True,
+ setup_adtrust=True)
+
+ def test_replica1_all_components_adtrust(self):
+ self.install_replica(self.replicas[1], setup_ca=True, setup_kra=True)
+
+
##
# Rest of master installation tests
##