Commit 47aa6ec9 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

QA: Add validation for cluster name

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarBernardo Dal Seno <>
parent 2176724e
......@@ -245,6 +245,9 @@ class _QaConfig(object):
"""Validates loaded configuration data.
if not self.get("name"):
raise qa_error.Error("Cluster name is required")
if not self.get("nodes"):
raise qa_error.Error("Need at least one node")
......@@ -174,6 +174,11 @@ class TestQaConfigLoad(unittest.TestCase):
check_fn = compat.partial(self._CheckLoadError, filename, testconfig)
# No cluster name
check_fn("Cluster name is required")
testconfig["name"] = ""
# No nodes
check_fn("Need at least one node")
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