diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-06-27 15:28:13 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-07-25 12:32:35 +0200 |
commit | 13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323 (patch) | |
tree | d853510dce1287d2366763efe38a6bff0f40015e /ipatests/test_integration/base.py | |
parent | ac70c2cc5cf6434045dcb8c7f54b4b0b59873c47 (diff) | |
download | freeipa-13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323.tar.gz freeipa-13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323.tar.xz freeipa-13f4b7e9cf8f0f9f0c33775ac8b64d28d9c82323.zip |
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.
Diffstat (limited to 'ipatests/test_integration/base.py')
-rw-r--r-- | ipatests/test_integration/base.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ipatests/test_integration/base.py b/ipatests/test_integration/base.py index 86acbcce1..43360a83a 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): |