[Libvirt-cim] [PATCH] [TEST] Updating test case to remove check for "Reserved" value

Sharad Mishra snmishra at us.ibm.com
Thu Apr 14 18:42:57 UTC 2011


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1302806505 25200
# Node ID 4c8e0c673d796ae7a5e17ee771d935e449b77bce
# Parent  1872aaa2378208e3359c7a32d809d78102506797
[TEST] Updating test case to remove check for "Reserved" value.

This test creates a DiskPool and gets its pool info. Then reads it again using  association. There is a delay in reading the two values and at times it is seen the these values change by few bytes. This patch will check for all StoragePool attributes except "Reserved".

Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>

diff -r 1872aaa23782 -r 4c8e0c673d79 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py	Thu Apr 14 10:34:37 2011 -0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py	Thu Apr 14 11:41:45 2011 -0700
@@ -99,7 +99,16 @@
         elements = managed_ele_values[cn]
 
         for ele in elements:
-            if assoc_val.items() == ele.items():
+            val1=assoc_val.items()
+            # "Reserved" is the second  attribute.
+            # remove it.
+            del val1[1]
+            val2=ele.items()
+            # "Reserved" is the second  attribute.
+            # remove it.
+            del val2[1]
+            # Now compare without "Reserved"
+            if val1 == val2:
                 return PASS
 
     except Exception, details:




More information about the Libvirt-cim mailing list