# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1208240754 -28800
# Node ID 0dd12af47c75cf09c45b00684c05a5b04efce8fa
# Parent 137e5079c73fcbfc70e6654cee0b3c3eb3c6acd2
[TEST] fix error code and description in ElementConforms.04
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 137e5079c73f -r 0dd12af47c75
suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Apr 11 16:58:23
2008 +0530
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue Apr 15 14:25:54
2008 +0800
@@ -91,11 +91,18 @@
ac_classname = 'Xen_ElementConformsToProfile'
bug = '92642'
-expr_values = {
- "INVALID_CCName_Keyname" : { 'rc' : '' ,
'desc' : '' }, \
- "INVALID_CCName_Keyvalue" : { 'rc' : '' ,
'desc' : '' }, \
- "INVALID_Name_Keyname" : { 'rc' : '' ,
'desc' : '' }, \
- "INVALID_Name_Keyvalue" : { 'rc' : '' ,
'desc' : '' }
+cs_values = {
+ "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc'
: 'No such instance' }, \
+ "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc'
: 'No such instance' }, \
+ "INVALID_Name_Keyname" : { 'rc' : 1 , 'desc'
: 'No domain name specified'}, \
+ "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc'
: 'No such instance' }
+ }
+
+hs_values = {
+ "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc'
: 'No such instance' }, \
+ "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc'
: 'No such instance' }, \
+ "INVALID_Name_Keyname" : { 'rc' : 6 , 'desc'
: 'No such instance'}, \
+ "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc'
: 'No such instance' }
}
def try_invalid_assoc(classname, name_val, i, field):
@@ -106,6 +113,10 @@
for j in range(len(name_val)/2):
k = j * 2
keys[name_val[k]] = name_val[k+1]
+ if classname == "Xen_HostSystem":
+ expr_values = hs_values
+ else:
+ expr_values = cs_values
ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, \
expr_values=expr_values[field], bug_no=bug)
if ret_val != PASS: