# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1301597899 25200
# Node ID 434ee28b0c8000175c81ea7291d7bcf01756cfdd
# Parent e71cf5aa81f77498c18ad7d870a41ed9760d3c06
[TEST] Fix HostSystem/01_enum.py test
This test was not taking into account the localhost discovered by sblim providers.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r e71cf5aa81f7 -r 434ee28b0c80 suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Mon Mar 07 17:40:29 2011 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Thu Mar 31 11:58:19 2011 -0700
@@ -55,8 +55,12 @@
if ret == PASS:
if len(hs) != 0:
- logger.error("Unexpected instance returned")
- return FAIL
+ if hs[0].CreationClassName != name or hs[0].Name != host:
+ logger.error("Exp %s, got %s", name, hs[0].CreationClassName)
+ logger.error("Exp %s, got %s", host, hs[0].Name)
+ return FAIL
+ else:
+ return PASS
else:
if linux_cs.CreationClassName != 'Linux_ComputerSystem'\
or linux_cs.Name != host: