[Libvirt-cim] [PATCH] [TEST] Fix HostSystem/01_enum.py test

Chip Vincent cvincent at linux.vnet.ibm.com
Fri Apr 1 12:50:27 UTC 2011


+1

On 03/31/2011 03:25 PM, Sharad Mishra wrote:
> # HG changeset patch
> # User Sharad Mishra<snmishra at 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 at 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:
>
> _______________________________________________
> 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