luetzkendorf 2004/11/16 06:25:52
Added: testsuite/testsuite/junit/xmltestcases/functional/copy/code
copy204CollOverwrite.xml
copy207lockedDescendent.xml
testsuite/testsuite/junit/xmltestcases/functional/move/mix
lockedMove.xml
testsuite/testsuite/junit/xmltestcases/functional/move/code
move207CollOverwrite.xml
move207lockedDescendent.xml
move412CollNotOverwrite.xml
Log:
tests for locked moves and copys
Revision Changes Path
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/copy/code/copy204CollOverwrite.xml
Index: copy204CollOverwrite.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Tests COPY with Overwrite: T on collections</abstract>
<description>
mkcol abc
put def/file1.html
mkcol def
put def/file2.html
copy abc --> def (with Overwrite: T)
get def/file2.html (should fail, because of Overwrite)
get def/file1.html (should pass)
delete
</description>
<expectedResult>copy should fail</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/abc/file1.html
HTTP/1.1</command>
<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%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html" />
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">COPY
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header>Overwrite: T</header>
<header
varUsage="globalVariableCollection,globalVariableServerName">Destination:
%globalVariableServerName%/%globalVariableCollection%/def</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">GET
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">GET
%globalVariableServerName%/%globalVariableCollection%/def/file1.html
HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 200 Ok</command>
<body fileReference="../../../contentDirectory/html.html" />
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/copy/code/copy207lockedDescendent.xml
Index: copy207lockedDescendent.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Checkes that a lock of any descendent resource of the target
makes COPY fail</abstract>
<description>
mkcol abc
mkcol def
put def/file2.html
lock def/file2.html
copy abc --> def (with Overwrite: T; should fail, because /def must
be deleted)
delete
</description>
<expectedResult>copy should fail</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html" />
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">LOCK
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
<header>Timeout: Second-120</header>
<header>Content-Type: text/xml</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<A:lockinfo xmlns:A="DAV:">
<A:locktype><A:write/></A:locktype>
<A:lockscope><A:exclusive/></A:lockscope>
<A:owner>some owner</A:owner>
</A: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:timeout>Second-120</d:timeout>
<d:locktoken><d:href/></d:locktoken>
<d:principal-URL><d:href>%globalVariableUserPath%</d:href></d:principal-URL>
<d:owner>some owner</d:owner>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">COPY
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header>Overwrite: T</header>
<header
varUsage="globalVariableCollection,globalVariableServerName">Destination:
%globalVariableServerName%/%globalVariableCollection%/def</header>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>%globalVariableServerName%/%globalVariableCollection%/def/file2.html</D:href>
<D:status>HTTP/1.1 423 Locked</D:status>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">UNLOCK
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
<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%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/move/mix/lockedMove.xml
Index: lockedMove.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract></abstract>
<description>
mkcol abc
lock abc
move abc --> def (with If header)
unlock def
delete
</description>
<expectedResult></expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">LOCK
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header>Timeout: Second-120</header>
<header>Content-Type: text/xml</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<A:lockinfo xmlns:A="DAV:">
<A:locktype><A:write/></A:locktype>
<A:lockscope><A:exclusive/></A:lockscope>
<A:owner>some owner</A:owner>
</A: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:timeout>Second-120</d:timeout>
<d:locktoken><d:href/></d:locktoken>
<d:principal-URL><d:href>%globalVariableUserPath%</d:href></d:principal-URL>
<d:owner>some owner</d:owner>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MOVE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header varUsage="locktoken"><![CDATA[If: (<%locktoken%>)]]></header>
<header
varUsage="globalVariableCollection,globalVariableServerName">Destination:
%globalVariableServerName%/%globalVariableCollection%/def</header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">UNLOCK
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">UNLOCK
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
<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%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/move/code/move207CollOverwrite.xml
Index: move207CollOverwrite.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> </abstract>
<description>
mkcol abc
put abc/file1.html
mkcol def
put def/file2.html
move abc --> def
get def/file2.html (should fail)
get def/file1.html (should pass)
delete
</description>
<expectedResult>move should fail</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/abc/file1.html
HTTP/1.1</command>
<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%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html" />
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MOVE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header
varUsage="globalVariableCollection,globalVariableServerName">Destination:
%globalVariableServerName%/%globalVariableCollection%/def</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">GET
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">GET
%globalVariableServerName%/%globalVariableCollection%/def/file1.html
HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 200 Ok</command>
<body fileReference="../../../contentDirectory/html.html" />
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/move/code/move207lockedDescendent.xml
Index: move207lockedDescendent.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Checkes that a lock of any descendent resource makes move fail
</abstract>
<description>
mkcol abc
put abc/help-doc.html
lock abc/help-doc.html
move abc --> def (should fail)
delete
</description>
<expectedResult>move should fail</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/abc/file.html
HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html" />
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">LOCK
%globalVariableServerName%/%globalVariableCollection%/abc/file.html
HTTP/1.1</command>
<header>Timeout: Second-120</header>
<header>Content-Type: text/xml</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<A:lockinfo xmlns:A="DAV:">
<A:locktype><A:write/></A:locktype>
<A:lockscope><A:exclusive/></A:lockscope>
<A:owner>some owner</A:owner>
</A: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:timeout>Second-120</d:timeout>
<d:locktoken><d:href/></d:locktoken>
<d:principal-URL><d:href>%globalVariableUserPath%</d:href></d:principal-URL>
<d:owner>some owner</d:owner>
</d:activelock>
</d:lockdiscovery>
</d:prop>
]]></body>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MOVE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header
varUsage="globalVariableCollection,globalVariableServerName">Destination:
%globalVariableServerName%/%globalVariableCollection%/def</header>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>%globalVariableServerName%/%globalVariableCollection%/abc/file.html</D:href>
<D:status>HTTP/1.1 423 Locked</D:status>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">UNLOCK
%globalVariableServerName%/%globalVariableCollection%/abc/file.html
HTTP/1.1</command>
<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%/def/file.html
HTTP/1.1</command>
<header varUsage="locktoken">Lock-Token: %locktoken%</header>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/functional/move/code/move412CollNotOverwrite.xml
Index: move412CollNotOverwrite.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> </abstract>
<description>
mkcol abc
put abc/file1.html
mkcol def
put def/file2.html
move abc --> def
get def/file2.html (should fail)
get def/file1.html (should pass)
delete
</description>
<expectedResult>move should fail</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MKCOL
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/abc/file1.html
HTTP/1.1</command>
<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%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
<body fileReference="../../../contentDirectory/html.html" />
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">MOVE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
<header
varUsage="globalVariableCollection,globalVariableServerName">Destination:
%globalVariableServerName%/%globalVariableCollection%/def</header>
<header>Overwrite: F</header>
</request>
<response>
<command>HTTP/1.0 412 Precondition Failes</command>
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">GET
%globalVariableServerName%/%globalVariableCollection%/def/file2.html
HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 200 Ok</command>
<body fileReference="../../../contentDirectory/html.html" />
</response>
</step>
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">GET
%globalVariableServerName%/%globalVariableCollection%/def/file1.html
HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 404 Not Found</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/abc HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
%globalVariableServerName%/%globalVariableCollection%/def HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</test>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]