From 13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 27 Jun 2013 15:28:13 +0200 Subject: Add install_topo to test tasks This allows a cluster of replicas and clients to be installed in a named topology. Several named topologies are available (star, line, complete, tree, tree2) and new ones can be defined as a simple function. --- ipatests/test_integration/base.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ipatests/test_integration/base.py') diff --git a/ipatests/test_integration/base.py b/ipatests/test_integration/base.py index 86acbcce..43360a83 100644 --- a/ipatests/test_integration/base.py +++ b/ipatests/test_integration/base.py @@ -35,7 +35,7 @@ log = log_mgr.get_logger(__name__) class IntegrationTest(object): num_replicas = 0 num_clients = 0 - topology = 'none' + topology = None @classmethod def setup_class(cls): @@ -78,14 +78,11 @@ class IntegrationTest(object): @classmethod def install(cls): - if cls.topology == 'none': + if cls.topology is None: return - elif cls.topology == 'star': - tasks.install_master(cls.master) - for replica in cls.replicas: - tasks.install_replica(cls.master, replica) else: - raise ValueError('Unknown topology %s' % cls.topology) + tasks.install_topo(cls.topology, + cls.master, cls.replicas, cls.clients) @classmethod def teardown_class(cls): -- cgit