summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-10-04 23:08:19 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-26 15:06:36 +0200
commit84ca1fc220c329b58fb6a22c8eb9bf17d3622c55 (patch)
tree09080f73dba540254997e438a5abe45ec413900b /ipatests
parentdc873007f8616ab9e77f903e235ba49f45ecde37 (diff)
downloadfreeipa-84ca1fc220c329b58fb6a22c8eb9bf17d3622c55.tar.gz
freeipa-84ca1fc220c329b58fb6a22c8eb9bf17d3622c55.tar.xz
freeipa-84ca1fc220c329b58fb6a22c8eb9bf17d3622c55.zip
CI: extend replication layouts tests with KRA
KRA should be tested with warious replication topologies as well, mainly in domain level 0 https://fedorahosted.org/freeipa/ticket/6088 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_integration/tasks.py18
-rw-r--r--ipatests/test_integration/test_replication_layouts.py48
2 files changed, 63 insertions, 3 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 0b460b952..ef5078b87 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -994,12 +994,20 @@ def double_circle_topo(master, replicas, site_size=6):
def install_topo(topo, master, replicas, clients, domain_level=None,
- skip_master=False, setup_replica_cas=True):
+ skip_master=False, setup_replica_cas=True,
+ setup_replica_kras=False):
"""Install IPA servers and clients in the given topology"""
+ if setup_replica_kras and not setup_replica_cas:
+ raise ValueError("Option 'setup_replica_kras' requires "
+ "'setup_replica_cas' set to True")
replicas = list(replicas)
installed = {master}
if not skip_master:
- install_master(master, domain_level=domain_level)
+ install_master(
+ master,
+ domain_level=domain_level,
+ setup_kra=setup_replica_kras
+ )
add_a_records_for_hosts_in_master_domain(master)
@@ -1009,7 +1017,11 @@ def install_topo(topo, master, replicas, clients, domain_level=None,
connect_replica(parent, child)
else:
log.info('Installing replica %s from %s' % (parent, child))
- install_replica(parent, child, setup_ca=setup_replica_cas)
+ install_replica(
+ parent, child,
+ setup_ca=setup_replica_cas,
+ setup_kra=setup_replica_kras
+ )
installed.add(child)
install_clients([master] + replicas, clients)
diff --git a/ipatests/test_integration/test_replication_layouts.py b/ipatests/test_integration/test_replication_layouts.py
index c17881530..53cae7d3d 100644
--- a/ipatests/test_integration/test_replication_layouts.py
+++ b/ipatests/test_integration/test_replication_layouts.py
@@ -52,6 +52,16 @@ class TestLineTopologyWithCA(LayoutsBaseTest):
self.replication_is_working()
+class TestLineTopologyWithCAKRA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_line_topology_with_ca_kra(self):
+ tasks.install_topo('line', self.master, self.replicas, [],
+ setup_replica_cas=True, setup_replica_kras=True)
+ self.replication_is_working()
+
+
class TestStarTopologyWithoutCA(LayoutsBaseTest):
num_replicas = 3
@@ -72,6 +82,16 @@ class TestStarTopologyWithCA(LayoutsBaseTest):
self.replication_is_working()
+class TestStarTopologyWithCAKRA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_star_topology_with_ca_kra(self):
+ tasks.install_topo('star', self.master, self.replicas, [],
+ setup_replica_cas=True, setup_replica_kras=True)
+ self.replication_is_working()
+
+
class TestCompleteTopologyWithoutCA(LayoutsBaseTest):
num_replicas = 3
@@ -92,6 +112,16 @@ class TestCompleteTopologyWithCA(LayoutsBaseTest):
self.replication_is_working()
+class TestCompleteTopologyWithCAKRA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_complete_topology_with_ca_kra(self):
+ tasks.install_topo('complete', self.master, self.replicas, [],
+ setup_replica_cas=True, setup_replica_kras=True)
+ self.replication_is_working()
+
+
@pytest.mark.skipif(config.domain_level == DOMAIN_LEVEL_0,
reason='does not work on DOMAIN_LEVEL_0 by design')
class Test2ConnectedTopologyWithoutCA(LayoutsBaseTest):
@@ -112,6 +142,15 @@ class Test2ConnectedTopologyWithCA(LayoutsBaseTest):
self.replication_is_working()
+class Test2ConnectedTopologyWithCAKRA(LayoutsBaseTest):
+ num_replicas = 33
+
+ def test_2_connected_topology_with_ca_kra(self):
+ tasks.install_topo('2-connected', self.master, self.replicas, [],
+ setup_replica_cas=True, setup_replica_kras=True)
+ self.replication_is_working()
+
+
@pytest.mark.skipif(config.domain_level == DOMAIN_LEVEL_0,
reason='does not work on DOMAIN_LEVEL_0 by design')
class TestDoubleCircleTopologyWithoutCA(LayoutsBaseTest):
@@ -130,3 +169,12 @@ class TestDoubleCircleTopologyWithCA(LayoutsBaseTest):
tasks.install_topo('double-circle', self.master, self.replicas, [],
setup_replica_cas=True)
self.replication_is_working()
+
+
+class TestDoubleCircleTopologyWithCAKRA(LayoutsBaseTest):
+ num_replicas = 29
+
+ def test_2_connected_topology_with_ca_kra(self):
+ tasks.install_topo('double-circle', self.master, self.replicas, [],
+ setup_replica_cas=True, setup_replica_kras=True)
+ self.replication_is_working()