Add HA cases for rabbitmq and galera
- kill rabbitmq_server on random node
- kill mysql server on node with maximum mysql connections
Change-Id: I8cf1aab4a4213c339ddefcecaa86d9a80d52acdb
diff --git a/tcp_tests/managers/underlay_ssh_manager.py b/tcp_tests/managers/underlay_ssh_manager.py
index 2008fba..7d3da96 100644
--- a/tcp_tests/managers/underlay_ssh_manager.py
+++ b/tcp_tests/managers/underlay_ssh_manager.py
@@ -363,12 +363,13 @@
with self.remote(node_name=host) as remote:
remote.upload(source, destination)
- def get_random_node(self):
+ def get_random_node(self, node_names=None):
"""Get random node name
+ :param node_names: list of strings
:return: str, name of node
"""
- return random.choice(self.node_names())
+ return random.choice(node_names or self.node_names())
def yaml_editor(self, file_path, node_name=None, host=None,
address_pool=None):