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

Chip Vincent cvincent at linux.vnet.ibm.com
Tue May 3 16:38:27 UTC 2011


ElementConforms - 01_forward.py: PASS

+1

On 04/14/2011 02:42 PM, Sharad Mishra wrote:
> # 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:
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim

-- 
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent at linux.vnet.ibm.com



More information about the Libvirt-cim mailing list