Commit 8e671b7c authored by Iustin Pop's avatar Iustin Pop
Browse files

QA: improve usability with cluster-init: False



When not initialising the cluster, consider all nodes are added, so that
multi-node tests (e.g. export, replace) work correctly (if there are
nodes, of course).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 1f864b60
......@@ -77,6 +77,9 @@ def SetupCluster():
if qa_config.TestEnabled('create-cluster'):
RunTest(qa_cluster.TestClusterInit)
RunTest(qa_node.TestNodeAddAll)
else:
# consider the nodes are already there
qa_node.MarkNodeAddedAll()
if qa_config.TestEnabled('node-info'):
RunTest(qa_node.TestNodeInfo)
......
......@@ -66,6 +66,18 @@ def TestNodeAddAll():
_NodeAdd(node, readd=False)
def MarkNodeAddedAll():
"""Mark all nodes as added.
This is useful if we don't create the cluster ourselves (in qa).
"""
master = qa_config.GetMasterNode()
for node in qa_config.get('nodes'):
if node != master:
node['_added'] = True
def TestNodeRemoveAll():
"""Removing all nodes from cluster."""
master = qa_config.GetMasterNode()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment