The QA tests the Xen instance status collector, but that is expected to fail when run on machines that do not use Xen.
Signed-off-by: Michele Tartara <[email protected]> --- qa/qa_monitoring.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/qa/qa_monitoring.py b/qa/qa_monitoring.py index d6a2709..0271a0e 100644 --- a/qa/qa_monitoring.py +++ b/qa/qa_monitoring.py @@ -24,8 +24,10 @@ """ from ganeti import _autoconf +from ganeti import constants import qa_config +import qa_utils from qa_utils import AssertCommand from qa_instance_utils import CreateInstanceByDiskTemplate, \ @@ -38,8 +40,13 @@ def TestInstStatusCollector(): """Test the Xen instance status collector. """ + enabled_hypervisors = qa_config.GetEnabledHypervisors() + is_xen = (constants.HT_XEN_PVM in enabled_hypervisors or + constants.HT_XEN_HVM in enabled_hypervisors) + fail = not is_xen + # Execute on master on an empty cluster - AssertCommand([MON_COLLECTOR, "inst-status-xen"]) + AssertCommand([MON_COLLECTOR, "inst-status-xen"], fail=fail) #Execute on cluster with instances node1 = qa_config.AcquireNode() @@ -47,8 +54,8 @@ def TestInstStatusCollector(): template = qa_config.GetDefaultDiskTemplate() instance = CreateInstanceByDiskTemplate([node1, node2], template) - AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node1) - AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node2) + AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node1, fail=fail) + AssertCommand([MON_COLLECTOR, "inst-status-xen"], node=node2, fail=fail) RemoveInstance(instance) node1.Release() -- 1.8.2.1
