summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-12-04 13:50:38 +0100
committerMartin Basti <mbasti@redhat.com>2015-12-07 16:44:36 +0100
commitbee222372aef6d8dbc353458392efc6b0ad225ea (patch)
tree60ba2c2026d2abd4803ca89f30e49855e55d4ce4 /ipatests/test_integration
parentdcb6626e870bcededb62d801720721d5d6c9795f (diff)
downloadfreeipa-bee222372aef6d8dbc353458392efc6b0ad225ea.tar.gz
freeipa-bee222372aef6d8dbc353458392efc6b0ad225ea.tar.xz
freeipa-bee222372aef6d8dbc353458392efc6b0ad225ea.zip
CI: test various topologies with multiple replicas
Test tests topologies listed bellow with and without CA on replicas: star topology: 3 replicas line topology: 3 replicas complete topology: 3 replicas Reviewed-By: Oleg Fayans <ofayans@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r--ipatests/test_integration/test_replication_layouts.py87
1 files changed, 87 insertions, 0 deletions
diff --git a/ipatests/test_integration/test_replication_layouts.py b/ipatests/test_integration/test_replication_layouts.py
new file mode 100644
index 000000000..3a3e9641e
--- /dev/null
+++ b/ipatests/test_integration/test_replication_layouts.py
@@ -0,0 +1,87 @@
+#
+# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
+#
+
+import time
+
+from ipatests.test_integration.base import IntegrationTest
+from ipatests.test_integration import tasks
+
+
+class LayoutsBaseTest(IntegrationTest):
+
+ @classmethod
+ def install(cls, mh):
+ # tests use custom installation
+ pass
+
+ def replication_is_working(self):
+ test_user = 'replication-testuser'
+ self.master.run_command(
+ ['ipa', 'user-add', test_user, '--first', 'test', '--last', 'user']
+ )
+
+ time.sleep(60) # make sure the replication of user is done
+
+ for r in self.replicas:
+ r.run_command(['ipa', 'user-show', test_user])
+
+
+class TestLineTopologyWithoutCA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_line_topology_without_ca(self):
+ tasks.install_topo('line', self.master, self.replicas, [],
+ setup_replica_cas=False)
+ self.replication_is_working()
+
+
+class TestLineTopologyWithCA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_line_topology_with_ca(self):
+ tasks.install_topo('line', self.master, self.replicas, [],
+ setup_replica_cas=True)
+ self.replication_is_working()
+
+
+class TestStarTopologyWithoutCA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_star_topology_without_ca(self):
+ tasks.install_topo('star', self.master, self.replicas, [],
+ setup_replica_cas=False)
+ self.replication_is_working()
+
+
+class TestStarTopologyWithCA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_star_topology_with_ca(self):
+ tasks.install_topo('star', self.master, self.replicas, [],
+ setup_replica_cas=True)
+ self.replication_is_working()
+
+
+class TestCompleteTopologyWithoutCA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_complete_topology_without_ca(self):
+ tasks.install_topo('complete', self.master, self.replicas, [],
+ setup_replica_cas=False)
+ self.replication_is_working()
+
+
+class TestCompleteTopologyWithCA(LayoutsBaseTest):
+
+ num_replicas = 3
+
+ def test_complete_topology_with_ca(self):
+ tasks.install_topo('complete', self.master, self.replicas, [],
+ setup_replica_cas=True)
+ self.replication_is_working()