# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1209361718 25200
# Node ID 6ffd17b2289f8ab1a043f452bce3ba79a24938e1
# Parent 22ed2c7c77e8ff3d96b40f1e0db2a931b5a7c37e
[TEST] add branch of err exp in RAFP.03
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 22ed2c7c77e8 -r 6ffd17b2289f
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Fri Apr 25
03:20:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Sun Apr 27
22:48:38 2008 -0700
@@ -28,12 +28,11 @@ from CimTest import Globals
from CimTest import Globals
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
+from XenKvmLib.const import CIM_REV
sup_types = ['Xen', 'XenFV', 'KVM']
-exp_rc = 6 #CIM_ERR_NOT_FOUND
-exp_desc = "No such instance (wrong) - resource pool type mismatch"
-
+rev = 2
@do_main(sup_types)
def main():
@@ -47,6 +46,13 @@ def main():
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(Globals.CIM_USER, Globals.CIM_PASS),
Globals.CIM_NS)
+
+ exp_rc = 6 #CIM_ERR_NOT_FOUND
+ exp_desc = "No such instance (wrong) - resource pool type mismatch"
+ if CIM_REV < rev:
+ exp_rc = 1 # CIM_ERR_FAILED
+ exp_desc = "Invalid InstanceID or unsupported pool type"
+
for k, v in poollist.items():
instanceref = CIMInstanceName(k,
keybindings = {"InstanceID" : v})