You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by lu...@apache.org on 2004/08/03 16:50:52 UTC
cvs commit: jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/conditional getConditionalByETagRange.xml getConditionalByTimeRange.xml getConditionalByTime.xml
luetzkendorf 2004/08/03 07:50:52
Modified: testsuite/testsuite/junit/xmltestcases/functional/get/conditional
getConditionalByTime.xml
Added: testsuite/testsuite/junit/xmltestcases/functional/get/code
get206.xml get416.xml
testsuite/testsuite/junit/xmltestcases/functional/get/conditional
getConditionalByETagRange.xml
getConditionalByTimeRange.xml
Log:
added some testcases for partial gets
Revision Changes Path
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/code/get206.xml
Index: get206.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Tests single range request</abstract>
<description> </description>
<expectedResult>all GETs should return 206 (Partial Content)</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Range: bytes=0-51</header>
</request>
<response>
<command>HTTP/1.0 206 Partial Content</command>
<header>Content-Range: bytes 0-51/52</header>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Range: bytes=0-3</header>
</request>
<response>
<command>HTTP/1.0 206 Partial Content</command>
<header>Content-Range: bytes 0-3/52</header>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>AABB</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Range: bytes=25-</header>
</request>
<response>
<command>HTTP/1.0 206 Partial Content</command>
<header>Content-Range: bytes 25-51/52</header>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>MNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Range: bytes=-6</header>
</request>
<response>
<command>HTTP/1.0 206 Partial Content</command>
<header>Content-Range: bytes 46-51/52</header>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>XXYYZZ</body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/code/get416.xml
Index: get416.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Tests single range request with invalid Range headers</abstract>
<description> </description>
<expectedResult>all GETs should return 416 (Requested Range Not Satisfiable)</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Range: bytes=0-52</header>
</request>
<response>
<command>HTTP/1.0 416 (Requested Range Not Satisfiable)</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
<header>Range: bytes=100-</header>
</request>
<response>
<command>HTTP/1.0 416 (Requested Range Not Satisfiable)</command>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/test.txt HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.3 +1 -1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/conditional/getConditionalByTime.xml
Index: getConditionalByTime.xml
===================================================================
RCS file: /home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/conditional/getConditionalByTime.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- getConditionalByTime.xml 3 Aug 2004 11:51:38 -0000 1.2
+++ getConditionalByTime.xml 3 Aug 2004 14:50:51 -0000 1.3
@@ -59,7 +59,7 @@
</step>
- <repeater repeatCount="120">
+ <repeater repeatCount="50">
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/conditional/getConditionalByETagRange.xml
Index: getConditionalByETagRange.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Checkes whether If-Range with ETags is handled correctly </abstract>
<description>
put a file
get the file (store the responsed ETag at varETag)
get the file with Range and If-Range: %varETag% (should return 206)
put the file again (i.e. modify it)
get the file with Range and If-Range: %varETag% (should return 200)
</description>
<expectedResult> </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header varDefinition="varETag">ETag: *</header>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varETag">If-Range: %varETag%</header>
<header>Range: bytes=0-3</header>
</request>
<response>
<command>HTTP/1.0 206 Partial Content</command>
<body>AABB</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ112233445566778899</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header>Range: bytes=0-3</header>
<header varUsage="varETag">If-Range: %varETag%</header>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ112233445566778899</body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/get/conditional/getConditionalByTimeRange.xml
Index: getConditionalByTimeRange.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Checkes whether If-Range with dates is handled correctly </abstract>
<description>
put a file
get the file (store the Last-Modified date at varLastMod)
get the file with Range header and If-Range: %varLastMod% (should return 206)
waste some time (at least a second, otherwise the next PUT may not change
the Last-Modified date)
put the file again (i.e. modify it)
get the file with Range header and If-Range: %varLastMod% (should return 200)
</description>
<expectedResult> </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header varDefinition="varLastMod">Last-Modified: *</header>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varLastMod">If-Range: %varLastMod%</header>
<header>Range: bytes=0-3</header>
</request>
<response>
<command>HTTP/1.0 206 Partial Content</command>
<header>Content-Range: bytes 0-3/52</header>
<header>Content-Type: text/plain;charset=utf-8</header>
<body>AABB</body>
</response>
</step>
<repeater repeatCount="50">
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body/>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
</response>
</step>
</repeater>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ112233445566778899</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varLastMod">If-Range: %varLastMod%</header>
<header>Range: bytes=0-3</header>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<body>AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ112233445566778899</body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org