
zli@linux.vnet.ibm.com wrote:
# HG changeset patch # User Zhengang Li <lizg@cn.ibm.com> # Date 1207728305 25200 # Node ID be122f36acaa24527bdc6339ed16b80526b5fcb7 # Parent f58194a3271fe20b19894c9f3472164316e1ee4c [TEST] change AllocationCapabilities expected error string
On FC8 it was 'Instance not found'. Now FC9 expects 'Requested Object could not be found'. This is only a string returned from CIMOM, I'm changing this to a word used in both messages. What we really expect is the CIM_ERR_NOT_FOUND. The rc code are identical on FC8 and FC9.
This fixes AllocationCapabilities.02 failures on a pegasus 2.7 CIMOM.
Signed-off-by: Zhengang Li <lizg@cn.ibm.com>
diff -r f58194a3271f -r be122f36acaa suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Apr 09 00:57:03 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Apr 09 01:05:05 2008 -0700 @@ -73,7 +73,7 @@ "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, \ 'desc' : 'No InstanceID specified' }, \ "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \ - 'desc' : 'Instance not found' } + 'desc' : 'found' } } def conf_file(): """
While this makes the test pass, I think there's potential for a false positive here. Some providers return messages like: "System Name not found" and "CreationClassName not found." Using just "found" would cause the test to pass in both cases, even though we really only want to pass if we get "System Name not found." A suggestion is to have the ability to check multiple descriptions. So then you could check against the expected error messages for both F8 and F9. The hope here is that the error messages don't change often. Thoughts? -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com