luetzkendorf 2004/09/03 10:16:25
Added: testsuite/testsuite/junit/xmltestcases/functional/put/conditional
putConditionalByETag.xml putConditionalByETag2.xml
putConditionalByTime.xml
Log:
added while checking bug 23494
Revision Changes Path
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/put/conditional/putConditionalByETag.xml
Index: putConditionalByETag.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Checkes whether If-Match and If-None-Match are handled correctly
</abstract>
<description>
put a file
get the file (store the responsed ETag at varETag1)
put the file with If-Match: %varETag1% (should return 204)
get the file (store the new ETag at varETag2)
put the file with If-None-Match: %varETag2% (should return 412)
put the file with If-None-Match: %varETag1% (should return 204)
put the file with If-Match: %varETag1% (should return 412)
</description>
<expectedResult> </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</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="varETag1">ETag: *</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varETag1">If-Match: %varETag1%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ</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>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header varDefinition="varETag2">ETag: *</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varETag2">If-None-Match: %varETag2%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 412 Precondition Failed</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varETag1">If-None-Match: %varETag1%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varETag1">If-Match: %varETag1%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 412 Precondition Failed</command>
</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/put/conditional/putConditionalByETag2.xml
Index: putConditionalByETag2.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Checkes If-Match and If-None-Match with special ETag *</abstract>
<description>
put If-Match: * (must fail because file does not exist)
put If-None-Match: * (must be successfull)
put If-None-Match: * (must fail because file DOES NOW exist)
put If-Match: * (must now be successfull)
</description>
<expectedResult> </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header>If-Match: *</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 412 Precondition Failed</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header>If-None-Match: *</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header>If-None-Match: *</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 412 Precondition Failed</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header>If-Match: *</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</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/put/conditional/putConditionalByTime.xml
Index: putConditionalByTime.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Checkes whether If-Modified-Since and If-Unmodified-Since are handled
correctly </abstract>
<description>
put a file
get the file (store the Last-Modified date at varLastMod)
put with If-Modified-Since: %varLastMod% (should return 304)
put with If-Unmodified-Since: %varLastMod% (should return 204)
waste some time (at least a second, otherwise the next PUT may not change
the Last-Modified date)
put the file again (i.e. modifiy it)
put with If-Modified-Since: %varLastMod% (should return 204)
put with If-Unmodified-Since: %varLastMod% (should return 412)
</description>
<expectedResult> </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ</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>ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varLastMod">If-Modified-Since: %varLastMod%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 304 Not Modified</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varLastMod">If-Unmodified-Since: %varLastMod%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<wait time="3000"/>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varLastMod">If-Modified-Since: %varLastMod%</header>
<body>ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ</body>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/help-doc.html HTTP/1.1</command>
<header varUsage="varLastMod">If-Unmodified-Since: %varLastMod%</header>
</request>
<response>
<command>HTTP/1.0 412 Precondition Failed</command>
</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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]