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/host.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ipatests/test_integration/host.py') diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py index e3cc4c92..38e6a34e 100644 --- a/ipatests/test_integration/host.py +++ b/ipatests/test_integration/host.py @@ -162,6 +162,10 @@ class Host(object): self.log_collectors = [] + def __str__(self): + template = ('<{s.__class__.__name__} {s.hostname} ({s.role})>') + return template.format(s=self) + def __repr__(self): template = ('<{s.__module__}.{s.__class__.__name__} ' '{s.hostname} ({s.role})>') @@ -222,9 +226,11 @@ class Host(object): :param raiseonerr: If true, an exception will be raised if the command does not exit with return code 0 """ + assert self.transport + + self._command_index += 1 command = RemoteCommand(self, argv, index=self._command_index, log_stdout=log_stdout) - self._command_index += 1 if cwd is None: cwd = self.config.test_dir -- cgit