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 ju...@apache.org on 2003/09/18 17:19:12 UTC
cvs commit: jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources lockNullFile_SearchParent.xml lockNullFile_Put.xml lockNullFile_props.xml lockNullFile_MandProps.xml lockNullFile_404.xml lockNullFile_200.xml lockNullCollection_SearchParent.xml lockNullCollection_Put.xml lockNullCollection_props.xml lockNullCollection_MkColPut.xml lockNullCollection_mkcol.xml lockNullCollection_MandProps.xml lockNullCollection_lockChild.xml lockNullCollection_404.xml lockNullCollection_200.xml
juergen 2003/09/18 08:19:12
Added: testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources
lockNullFile_SearchParent.xml lockNullFile_Put.xml
lockNullFile_props.xml lockNullFile_MandProps.xml
lockNullFile_404.xml lockNullFile_200.xml
lockNullCollection_SearchParent.xml
lockNullCollection_Put.xml
lockNullCollection_props.xml
lockNullCollection_MkColPut.xml
lockNullCollection_mkcol.xml
lockNullCollection_MandProps.xml
lockNullCollection_lockChild.xml
lockNullCollection_404.xml
lockNullCollection_200.xml
Log:
(fga) new test cases for lock null resources. Pending of a second check.
Revision Changes Path
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullFile_SearchParent.xml
Index: lockNullFile_SearchParent.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks that a lock null resource appears as a member of its parent collection</abstract>
<description>The test case consist of following steps:
- Lock a non existing file in a non existing collection.
- SEARCH parent collection
- UNLOCK (since no PUT has been done, file should disappear).
- Delete (404 Not Found expected).
</description>
<expectedResult>The lock null resource should appear as a member of its parent collection.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableServerName">SEARCH /%globalVariableServerName% HTTP/1.1</command>
<body varUsage="globalVariableCollection,test2contentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:prop>
<D:resourcetype/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
</D:basicsearch>
</searchrequest>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName,test3contentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:lock-null />
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:collection />
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullFile_Put.xml
Index: lockNullFile_Put.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (file), and then a PUT.</abstract>
<description>The test case consist of following steps:
- Lock a non existing file.
- PUT (no lock token => 423 Locked)
- PUT (+ lock token => 201 Created)
- UNLOCK.
- Delete file.
</description>
<expectedResult>All commands send after the lock should return a 200 OK.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<body fileReference="../../../contentDirectory/validXML.xm1"/>
</request>
<response>
<command>HTTP/1.0 423 Locked</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="automaticVariable1"><![CDATA[If: (<%automaticVariable1%>)]]></header>
<body fileReference="../../../contentDirectory/validXML.xm1"/>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<!--
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step> -->
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullFile_props.xml
Index: lockNullFile_props.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checking if PROPFIND returns values for lockdiscovery and supportedlock</abstract>
<description>The test case consist of following steps:
- Lock a non existing file.
- PROPFIND: lockdiscovery and supportedlock
- UNLOCK (since no PUT has been done, file should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>Lockdiscovery and supported lock should have a value.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<lockinfo xmlns:D="DAV:">
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<owner>
<href></href>
</owner>
</lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>Depth: 1</header>
<body><![CDATA[<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop>
<lockdiscovery/>
<supportedlock/>
</prop>
</propfind>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml</href>
<propstat>
<prop>
<lockdiscovery>
<activelock>
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<depth>infinity</depth>
<owner>
<href>/%globalVariableServerName%/</href>
</owner>
<timeout>*</timeout>
<locktoken>
<href>*</href>
</locktoken>
<principal-URL>
<href>*</href>
</principal-URL>
</activelock>
</lockdiscovery>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
<lockentry>
<lockscope>
<shared/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullFile_MandProps.xml
Index: lockNullFile_MandProps.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checking if the lock null resource has defined on it all mandatory DAV props.</abstract>
<description>The test case consist of following steps:
- Lock a non existing file.
- PROPFIND: mandatory DAV props.
- UNLOCK (since no PUT has been done, resource should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>All mandatory DAV props are returned, probably without value.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<lockinfo xmlns:D="DAV:">
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<owner>
<href></href>
</owner>
</lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>Depth: 1</header>
<body><![CDATA[<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop>
<creationdate/>
<getcontentlength/>
<getlastmodified/>
<lockdiscovery/>
<resourcetype/>
<source/>
<supportedlock/>
</prop>
</propfind>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml</href>
<propstat>
<prop>
<creationdate>2003-09-17T12:39:44Z</creationdate>
<source />
<lockdiscovery>
<activelock>
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<depth>infinity</depth>
<owner>
<href>/%globalVariableServerName%/</href>
</owner>
<timeout>*</timeout>
<locktoken>
<href>*</href>
</locktoken>
<principal-URL>
<href>*</href>
</principal-URL>
</activelock>
</lockdiscovery>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
<lockentry>
<lockscope>
<shared/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
<getlastmodified>Wed, 17 Sep 2003 12:39:44 GMT</getlastmodified>
<getcontentlength>0</getcontentlength>
<resourcetype>
<lock-null />
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullFile_404.xml
Index: lockNullFile_404.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (file) and the status returned by the listed requests.</abstract>
<description>The test case consist of following steps:
- Lock a non existing file.
- PROPPATCH
- GET
- HEAD
- DELETE
- COPY
- MOVE
- UNLOCK (since no PUT has been done, file should disappear).
- Delete (again 404 Not Found).
</description>
<expectedResult>All commands send after the lock should return a 404 Not Found.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:" xmlns:R="http://www.com/">
<D:set>
<D:prop>
<D:displayname>testLockNullFile.xml</D:displayname>
</D:prop>
</D:set>
</D:propertyupdate>
]]></body>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header>Accept: */*</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">HEAD /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<body/>
</request>
<response>
<command>HTTP/1.1 404 Not Found</command>
<body/>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<body/>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">COPY /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="globalVariableCollection,globalVariableServerName">Destination: /%globalVariableServerName%/%globalVariableCollection%/testLockNullFileCopy.xml</header>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<body/>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MOVE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header varUsage="globalVariableCollection,globalVariableServerName">Destination: /%globalVariableServerName%/%globalVariableCollection%/testLockNullFileMoved.xml</header>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header>Overwrite: T</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<body/>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
<header>Translate: f</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullFile_200.xml
Index: lockNullFile_200.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (file), and the status returned from OPTIONS, PROPFIND</abstract>
<description>The test case consist of following steps:
- Lock a non existing file.
- OPTIONS
- PROPFIND
- UNLOCK (since no PUT has been done, file should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>All commands send after the lock should return a 200 OK.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">OPTIONS /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Content-type: text/xml; charset="utf-8"</header>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>DAV: *, version-control, version-history, checkout-in-place, workspace, working-resource, update, label</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>Depth: 1</header>
<body><![CDATA[<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop>
<name/>
<parentname/>
<href/>
<ishidden/>
<iscollection/>
<isreadonly/>
<getcontenttype/>
<contentclass/>
<getcontentlanguage/>
<creationdate/>
<lastaccessed/>
<getlastmodified/>
<getcontentlength/>
<resourcetype/>
<isstructureddocument/>
<defaultdocument/>
<isroot/>
</prop>
</propfind>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:S="http://jakarta.apache.org/slide/">
<response>
<href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml</href>
<propstat>
<prop>
<creationdate>2001-07-19T09:12:17Z</creationdate>
<getlastmodified>Thu, 19 Jul 2001 09:12:17 GMT</getlastmodified>
<getcontentlength>0</getcontentlength>
<resourcetype>
<lock-null/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<name/>
<parentname/>
<href/>
<ishidden/>
<iscollection/>
<isreadonly/>
<getcontenttype/>
<contentclass/>
<getcontentlanguage/>
<lastaccessed/>
<isstructureddocument/>
<defaultdocument/>
<isroot/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
</multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullFile.xml HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_SearchParent.xml
Index: lockNullCollection_SearchParent.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks that a lock null resource appears as a member of its parent collection</abstract>
<description>The test case consist of following steps:
- Lock a non existing file in a non existing collection.
- SEARCH parent collection.
- UNLOCK (since no PUT has been done, file should disappear).
- Delete (404 Not Found expected).
</description>
<expectedResult>The lock null resource should appear as a member of its parent collection.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableServerName">SEARCH /%globalVariableServerName% HTTP/1.1</command>
<body varUsage="globalVariableCollection,test2contentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:prop>
<D:resourcetype/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
</D:basicsearch>
</searchrequest>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName,test3contentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:lock-null/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:collection/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_Put.xml
Index: lockNullCollection_Put.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (collection) and </abstract>
<description>The test case consist of following steps:
- LOCK a non existing collection.
- PUT a file with Lock token
- PUT a file with no Lock token (expected 423 Locked)
- UNLOCK and Delete collection.
</description>
<expectedResult>Status code returned by Lock Method (on the null resource) must be 200. Collection can afterwards be created and it is locked.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut/helpDoc1.html HTTP/1.1</command>
<header varUsage="automaticVariable1"><![CDATA[If: (<%automaticVariable1%>)]]></header>
<body fileReference="../../../contentDirectory/html.html"/>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<!--
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP/1.1</command>
<header varUsage="automaticVariable1"><![CDATA[If: (<%automaticVariable1%>)]]></header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Wed, 14 Mar 2001 14:47:04 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
-->
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut/help-docTest.html HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html"/>
</request>
<response>
<command>HTTP/1.0 423 Locked</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="automaticVariable1">Lock-Token: %automaticVariable1%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_props.xml
Index: lockNullCollection_props.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checking if PROPFIND returns values for lockdiscovery and supportedlock</abstract>
<description>The test case consist of following steps:
- Lock a non existing collection.
- PROPFIND: lockdiscovery and supportedlock
- UNLOCK (since no PUT has been done, collection should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>Lockdiscovery and supported lock should have a value.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<lockinfo xmlns:D="DAV:">
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<owner>
<href></href>
</owner>
</lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>Depth: 1</header>
<body><![CDATA[<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop>
<lockdiscovery/>
<supportedlock/>
</prop>
</propfind>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection</href>
<propstat>
<prop>
<lockdiscovery>
<activelock>
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<depth>infinity</depth>
<owner>
<href>/%globalVariableServerName%/</href>
</owner>
<timeout>*</timeout>
<locktoken>
<href>*</href>
</locktoken>
<principal-URL>
<href>*</href>
</principal-URL>
</activelock>
</lockdiscovery>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
<lockentry>
<lockscope>
<shared/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_MkColPut.xml
Index: lockNullCollection_MkColPut.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (collection) and </abstract>
<description>The test case consist of following steps:
- LOCK a non existing collection.
- PUT a file with Lock token
- MKCOL with lock token (expected: 201 Created)
- PUT a file with no Lock token (expected 423 Locked)
- UNLOCK and Delete collection.
</description>
<expectedResult>Status code returned by Lock Method (on the null resource) must be 200. Collection can afterwards be created and it is locked.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut/helpDoc1.html HTTP/1.1</command>
<header varUsage="automaticVariable1"><![CDATA[If: (<%automaticVariable1%>)]]></header>
<body fileReference="../../../contentDirectory/html.html"/>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP/1.1</command>
<header varUsage="automaticVariable1"><![CDATA[If: (<%automaticVariable1%>)]]></header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Wed, 14 Mar 2001 14:47:04 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut/help-docTest.html HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html"/>
</request>
<response>
<command>HTTP/1.0 423 Locked</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="automaticVariable1">Lock-Token: %automaticVariable1%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullPut HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Destroy: NoUndelete</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
<header>Date: Thu, 1 Mar 2001 16:55:03 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_mkcol.xml
Index: lockNullCollection_mkcol.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (collection) and creating a collection afterwards.</abstract>
<description>The test case consist of following steps:
- LOCK a non existing collection.
- MKCOL (without lock token) (expected: 423 Locked)
- MKCOL (with lock token) (expected: 201 Created)
- UNLOCK.
- Delete collection.
</description>
<expectedResult>Status code returned by Lock Method (on the null resource) must be 200. Collection can afterwards be created and it is locked.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNull200 HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL /%globalVariableServerName%/%globalVariableCollection%/testLockNull200/childFolder HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL /%globalVariableServerName%/%globalVariableCollection%/testLockNull200 HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 423 Locked</command>
<header>Date: Wed, 14 Mar 2001 14:47:04 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL /%globalVariableServerName%/%globalVariableCollection%/testLockNull200 HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Wed, 14 Mar 2001 14:47:04 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNull200 HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNull200 HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Destroy: NoUndelete</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
<header>Date: Thu, 1 Mar 2001 16:55:03 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_MandProps.xml
Index: lockNullCollection_MandProps.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checking if the lock null resource has defined on it all mandatory DAV props.</abstract>
<description>The test case consist of following steps:
- Lock a non existing file.
- PROPFIND: mandatory DAV props.
- UNLOCK (since no PUT has been done, resource should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>All mandatory DAV props are returned, probably without value.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<lockinfo xmlns:D="DAV:">
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<owner>
<href></href>
</owner>
</lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>Depth: 1</header>
<body><![CDATA[<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop>
<creationdate/>
<getcontentlength/>
<getlastmodified/>
<lockdiscovery/>
<resourcetype/>
<source/>
<supportedlock/>
</prop>
</propfind>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection</href>
<propstat>
<prop>
<creationdate>2003-09-17T12:39:44Z</creationdate>
<source />
<lockdiscovery>
<activelock>
<locktype>
<write/>
</locktype>
<lockscope>
<exclusive/>
</lockscope>
<depth>infinity</depth>
<owner>
<href>/%globalVariableServerName%/</href>
</owner>
<timeout>*</timeout>
<locktoken>
<href>*</href>
</locktoken>
<principal-URL>
<href>*</href>
</principal-URL>
</activelock>
</lockdiscovery>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
<lockentry>
<lockscope>
<shared/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
<getlastmodified>Wed, 17 Sep 2003 12:39:44 GMT</getlastmodified>
<getcontentlength>0</getcontentlength>
<resourcetype>
<lock-null />
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_lockChild.xml
Index: lockNullCollection_lockChild.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (collection) that is a children of an already locked null collection</abstract>
<description>The test case consist of following steps:
- Lock a non existing collection.
- Lock a non existing collection child of the previous collection
- PROPFIND
- UNLOCK (since no MKCOL has been done, collection should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>All commands send after the lock should return a 200 OK.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header>Timeout: Second-604800</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection/testLockNullChild HTTP/1.1</command>
<header varUsage="automaticVariable1"><![CDATA[If: (<%automaticVariable1%>)]]></header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>Timeout: Second-604800</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktokenChild" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableServerName">SEARCH /%globalVariableServerName% HTTP/1.1</command>
<body varUsage="globalVariableCollection,test2contentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:prop>
<D:resourcetype/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
</D:basicsearch>
</searchrequest>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName,test3contentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:lock-null/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:collection/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection/testLockNullChild HTTP/1.1</command>
<header>TE: trailers, deflate, gzip, compress</header>
<header varUsage="locktokenChild">Lock-Token: %locktokenChild%</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_404.xml
Index: lockNullCollection_404.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (collection) and the status returned by the listed requests.</abstract>
<description>The test case consist of following steps:
- Lock a non existing collection.
- PROPPATCH
- GET
- HEAD
- DELETE
- COPY
- MOVE
- UNLOCK (since no MKCOL has been done, collection should disappear).
- Delete (again 404 Not Found).
</description>
<expectedResult>All commands send after the lock should return a 404 Not Found.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:" xmlns:R="http://www.com/">
<D:set>
<D:prop>
<D:displayname>testLockNull_404</D:displayname>
</D:prop>
</D:set>
</D:propertyupdate>
]]></body>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">GET /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header>Accept: */*</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<header>Date: Mon, 19 Mar 2001 16:59:39 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">HEAD /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<body/>
</request>
<response>
<command>HTTP/1.1 404 Not Found</command>
<body/>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header>Destroy: NoUndelete</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<body/>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">COPY /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header varUsage="globalVariableCollection,globalVariableServerName">Destination: /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404_Copy</header>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<body/>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MOVE /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header varUsage="globalVariableCollection,globalVariableServerName">Destination: /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404_MOVE</header>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header>Overwrite: T</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
<body/>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNull_404 HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Destroy: NoUndelete</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/lock/null-resources/lockNullCollection_200.xml
Index: lockNullCollection_200.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checks locking a null resource (collection), and the status returned from OPTIONS, PROPFIND</abstract>
<description>The test case consist of following steps:
- Lock a non existing collection.
- OPTIONS
- PROPFIND
- UNLOCK (since no MKCOL has been done, collection should disappear).
- Delete (404 Not Found).
</description>
<expectedResult>All commands send after the lock should return a 200 OK.</expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">LOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header>Timeout: Second-604800</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
<header>Content-type: text/xml</header>
<body><![CDATA[<?xml version="1.0"?>
<D:lockinfo xmlns:D="DAV:">
<D:locktype>
<D:write/>
</D:locktype>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:owner>
<D:href></D:href>
</D:owner>
</D:lockinfo>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableUserPath,globalVariableServerName,user,host" varDefinition="locktoken" varPath="prop/lockdiscovery/activelock/locktoken/href"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
<d:activelock>
<d:locktype>
<d:write/>
</d:locktype>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:depth>infinity</d:depth>
<d:owner>
<A:href xmlns:A="DAV:"/>
</d:owner>
<d:timeout>Second-604800</d:timeout>
<d:locktoken>
<d:href>*</d:href>
</d:locktoken>
<d:principal-URL>
<d:href>%globalVariableUserPath%</d:href>
</d:principal-URL>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">OPTIONS /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Content-type: text/xml; charset="utf-8"</header>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
<header>DAV: *, version-control, version-history, checkout-in-place, workspace, working-resource, update, label</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>Depth: 1</header>
<body><![CDATA[<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop>
<name/>
<parentname/>
<href/>
<ishidden/>
<iscollection/>
<isreadonly/>
<getcontenttype/>
<contentclass/>
<getcontentlanguage/>
<creationdate/>
<lastaccessed/>
<getlastmodified/>
<getcontentlength/>
<resourcetype/>
<isstructureddocument/>
<defaultdocument/>
<isroot/>
</prop>
</propfind>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:S="http://jakarta.apache.org/slide/">
<response>
<href>/%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection</href>
<propstat>
<prop>
<creationdate>2001-07-19T09:12:17Z</creationdate>
<getlastmodified>Thu, 19 Jul 2001 09:12:17 GMT</getlastmodified>
<getcontentlength>0</getcontentlength>
<resourcetype>
<lock-null/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<name/>
<parentname/>
<href/>
<ishidden/>
<iscollection/>
<isreadonly/>
<getcontenttype/>
<contentclass/>
<getcontentlanguage/>
<lastaccessed/>
<isstructureddocument/>
<defaultdocument/>
<isroot/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
</multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">UNLOCK /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Connection: Keep-Alive, TE</header>
<header>TE: trailers, deflate, gzip, compress</header>
<header>User-Agent: UCI DAV Explorer/0.70 RPT-HTTPClient/0.3-2E</header>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
<header>Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">DELETE /%globalVariableServerName%/%globalVariableCollection%/testLockNullCollection HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Destroy: NoUndelete</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</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