summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorcarolann.graves <carolann.graves>2007-01-11 16:49:29 +0000
committercarolann.graves <carolann.graves>2007-01-11 16:49:29 +0000
commit5ac5e59488583c515c3c661d94445df88f775adc (patch)
tree643d4af96edc3a7882148fba0e7e14661d41bfa6 /test
parent083c35679f763c0b7791a1268108eb6a4d52d710 (diff)
downloadtog-pegasus-5ac5e59488583c515c3c661d94445df88f775adc.zip
tog-pegasus-5ac5e59488583c515c3c661d94445df88f775adc.tar.gz
tog-pegasus-5ac5e59488583c515c3c661d94445df88f775adc.tar.xz
BUG#: 5955
TITLE: Simplify CIM version checking in ExportServer CIMExportRequestDecoder and add test cases to cover new code branches DESCRIPTION: Simplified version checking and added test cases.
Diffstat (limited to 'test')
-rw-r--r--test/wetest/static/ExportErrorXml/BadCimVersion02.xml26
-rw-r--r--test/wetest/static/ExportErrorXml/BadCimVersion02rspgood.xml3
-rw-r--r--test/wetest/static/ExportErrorXml/BadCimVersion03.xml26
-rw-r--r--test/wetest/static/ExportErrorXml/BadCimVersion03rspgood.xml3
-rw-r--r--test/wetest/static/ExportErrorXml/BadCimVersion04.xml26
-rw-r--r--test/wetest/static/ExportErrorXml/BadCimVersion04rspgood.xml3
-rw-r--r--test/wetest/static/ExportErrorXml/Makefile3
7 files changed, 90 insertions, 0 deletions
diff --git a/test/wetest/static/ExportErrorXml/BadCimVersion02.xml b/test/wetest/static/ExportErrorXml/BadCimVersion02.xml
new file mode 100644
index 0000000..856339c
--- /dev/null
+++ b/test/wetest/static/ExportErrorXml/BadCimVersion02.xml
@@ -0,0 +1,26 @@
+M-POST /CIMListener/consumer1 HTTP/1.1
+HOST: localhost:5988
+Content-Type: application/xml; charset="utf-8"
+content-length: 0000000485
+CIMExport: MethodRequest
+CIMExportMethod: ExportIndication
+
+<?xml version="1.0" encoding="utf-8" ?>
+<CIM CIMVERSION="2,0" DTDVERSION="2.0">
+<MESSAGE ID="1001" PROTOCOLVERSION="1.0">
+<SIMPLEEXPREQ>
+<EXPMETHODCALL NAME="ExportIndication">
+<EXPPARAMVALUE NAME="NewIndication">
+<INSTANCE CLASSNAME="My_IndicationClass" >
+<PROPERTY NAME="DeviceName" TYPE="string">
+<VALUE>Disk</VALUE>
+</PROPERTY>
+<PROPERTY NAME="DeviceId" TYPE="uint32">
+<VALUE>1</VALUE>
+</PROPERTY>
+</INSTANCE>
+</EXPPARAMVALUE>
+</EXPMETHODCALL>
+</SIMPLEEXPREQ>
+</MESSAGE>
+</CIM>
diff --git a/test/wetest/static/ExportErrorXml/BadCimVersion02rspgood.xml b/test/wetest/static/ExportErrorXml/BadCimVersion02rspgood.xml
new file mode 100644
index 0000000..c13b54a
--- /dev/null
+++ b/test/wetest/static/ExportErrorXml/BadCimVersion02rspgood.xml
@@ -0,0 +1,3 @@
+HTTP/1.1 501 Not Implemented
+CIMError: unsupported-cim-version
+
diff --git a/test/wetest/static/ExportErrorXml/BadCimVersion03.xml b/test/wetest/static/ExportErrorXml/BadCimVersion03.xml
new file mode 100644
index 0000000..1f6a4d8
--- /dev/null
+++ b/test/wetest/static/ExportErrorXml/BadCimVersion03.xml
@@ -0,0 +1,26 @@
+M-POST /CIMListener/consumer1 HTTP/1.1
+HOST: localhost:5988
+Content-Type: application/xml; charset="utf-8"
+content-length: 0000000485
+CIMExport: MethodRequest
+CIMExportMethod: ExportIndication
+
+<?xml version="1.0" encoding="utf-8" ?>
+<CIM CIMVERSION="2.." DTDVERSION="2.0">
+<MESSAGE ID="1001" PROTOCOLVERSION="1.0">
+<SIMPLEEXPREQ>
+<EXPMETHODCALL NAME="ExportIndication">
+<EXPPARAMVALUE NAME="NewIndication">
+<INSTANCE CLASSNAME="My_IndicationClass" >
+<PROPERTY NAME="DeviceName" TYPE="string">
+<VALUE>Disk</VALUE>
+</PROPERTY>
+<PROPERTY NAME="DeviceId" TYPE="uint32">
+<VALUE>1</VALUE>
+</PROPERTY>
+</INSTANCE>
+</EXPPARAMVALUE>
+</EXPMETHODCALL>
+</SIMPLEEXPREQ>
+</MESSAGE>
+</CIM>
diff --git a/test/wetest/static/ExportErrorXml/BadCimVersion03rspgood.xml b/test/wetest/static/ExportErrorXml/BadCimVersion03rspgood.xml
new file mode 100644
index 0000000..c13b54a
--- /dev/null
+++ b/test/wetest/static/ExportErrorXml/BadCimVersion03rspgood.xml
@@ -0,0 +1,3 @@
+HTTP/1.1 501 Not Implemented
+CIMError: unsupported-cim-version
+
diff --git a/test/wetest/static/ExportErrorXml/BadCimVersion04.xml b/test/wetest/static/ExportErrorXml/BadCimVersion04.xml
new file mode 100644
index 0000000..7b98e43
--- /dev/null
+++ b/test/wetest/static/ExportErrorXml/BadCimVersion04.xml
@@ -0,0 +1,26 @@
+M-POST /CIMListener/consumer1 HTTP/1.1
+HOST: localhost:5988
+Content-Type: application/xml; charset="utf-8"
+content-length: 0000000485
+CIMExport: MethodRequest
+CIMExportMethod: ExportIndication
+
+<?xml version="1.0" encoding="utf-8" ?>
+<CIM CIMVERSION="2.9" DTDVERSION="2.0">
+<MESSAGE ID="1001" PROTOCOLVERSION="1.0">
+<SIMPLEEXPREQ>
+<EXPMETHODCALL NAME="ExportIndication">
+<EXPPARAMVALUE NAME="NewIndication">
+<INSTANCE CLASSNAME="My_IndicationClass" >
+<PROPERTY NAME="DeviceName" TYPE="string">
+<VALUE>Disk</VALUE>
+</PROPERTY>
+<PROPERTY NAME="DeviceId" TYPE="uint32">
+<VALUE>1</VALUE>
+</PROPERTY>
+</INSTANCE>
+</EXPPARAMVALUE>
+</EXPMETHODCALL>
+</SIMPLEEXPREQ>
+</MESSAGE>
+</CIM>
diff --git a/test/wetest/static/ExportErrorXml/BadCimVersion04rspgood.xml b/test/wetest/static/ExportErrorXml/BadCimVersion04rspgood.xml
new file mode 100644
index 0000000..c13b54a
--- /dev/null
+++ b/test/wetest/static/ExportErrorXml/BadCimVersion04rspgood.xml
@@ -0,0 +1,3 @@
+HTTP/1.1 501 Not Implemented
+CIMError: unsupported-cim-version
+
diff --git a/test/wetest/static/ExportErrorXml/Makefile b/test/wetest/static/ExportErrorXml/Makefile
index f0d3a69..7c29585 100644
--- a/test/wetest/static/ExportErrorXml/Makefile
+++ b/test/wetest/static/ExportErrorXml/Makefile
@@ -35,6 +35,9 @@ include $(ROOT)/test/config.mak
XMLSCRIPTS = \
BadCimVersion01 \
+ BadCimVersion02 \
+ BadCimVersion03 \
+ BadCimVersion04 \
BadDtdVersion01 \
BadDtdVersion02 \
BadDtdVersion03 \