juergen     2002/06/24 04:24:41

  Added:       testsuite/testsuite/junit/xmltestcases/ACL/functional/propfind
                        propfindAclAllR.xml propfindAclAllF.xml
                        propfindAclAllC.xml
  Log:
  New ACL test cases
  
  Revision  Changes    Path
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/propfind/propfindAclAllR.xml
  
  Index: propfindAclAllR.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
  <test>
  
  
  
  <specification>
                
                <abstract>Test to check acl property on a collection</abstract>
                
                <pre-Requisite></pre-Requisite>
                
                <description>1) Propfind on the Root directory with depth '0' to check 
for "acl" property.</description>
                
                <expectedResult>Property found by propFind .
                </expectedResult>
                
        </specification>
        
        
        
        
     <step>
           
      <request>
     <command varUsage="globalVariableServerName">PROPFIND 
/%globalVariableServerName%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <header>Depth: 0</header>
     <body varUsage="globalVariableServerName"><![CDATA[<?xml version="1.0" 
encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:acl/>
         </D:prop>
      </D:propfind>]]>
     </body>
    </request>
              
              <response>
                 <command>HTTP/1.0 207 Multi-Status</command>
                 <header>Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 
2.2; Java 1.3.0_02; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header> 
                 <body varUsage="globalVariableServerName">
                 &lt;?xml version="1.0" encoding="utf-8" ?&gt;
              &lt;multistatus xmlns="DAV:" xmlns:S="http://jakarta.apache.org/slide/"; 
&gt;
              &lt;response&gt;
              &lt;href&gt;/%globalVariableServerName%/&lt;/href&gt;
              &lt;propstat&gt;
              &lt;prop&gt;
              &lt;acl&gt;
              &lt;ace&gt;
              &lt;principal&gt;
              
&lt;href&gt;/%globalVariableServerName%/administration/security/users&lt;/href&gt;
              &lt;/principal&gt;
              &lt;grant&gt;
              &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
              &lt;/grant&gt;
              &lt;/ace&gt;
              &lt;/acl&gt;
              &lt;/prop&gt;
              &lt;status&gt;HTTP/1.1 200 OK&lt;/status&gt;
              &lt;/propstat&gt;
              &lt;/response&gt;
                &lt;/multistatus&gt;
              
              </body>
              </response>
     </step>
        
        
        
  </test>
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/propfind/propfindAclAllF.xml
  
  Index: propfindAclAllF.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
  <test>
  <specification> 
   <abstract> Checks if Propfind Method with Status code 207 works fine. </abstract> 
   <description>Does a series of PropFinds on the root directory and 2 different 
files.</description>
   <expectedResult> Status code returned by Propfind Method must be multi-status 
207</expectedResult>
   </specification>
  
  
  <step>
    <request>
      <command varUsage="globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/patient_1.xml HTTP/1.1</command>
      <header>Accept-Language: en-us</header>
      <header>Translate: f</header>
      <header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV 
1.1</header>
      <header>Connection: Keep-Alive</header>
      <body>&lt;patient&gt;
   &lt;name&gt;
    &lt;surname&gt;pat rec 1&lt;/surname&gt;
    &lt;firstname&gt;1&lt;/firstname&gt;
    &lt;/name&gt;
  &lt;/patient&gt;
  </body>
    </request>
    <response>
      <command>HTTP/1.0 201 Created</command>
      <body />
    </response>
  </step>
  
  
  <step>
    <request>
      <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/ HTTP/1.1</command>
      <header>Accept-Language: en-us</header>
      <header>Content-Type: text/xml</header>
      <header>Translate: f</header>
      <header>Depth: 1</header>
      <header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV 
1.1</header>
      <header>Connection: Keep-Alive</header>
      <body>&lt;?xml version="1.0" ?&gt;
  &lt;propfind xmlns="DAV:"&gt;
  &lt;/propfind&gt;
  </body>
    </request>
    <response>
      <command>HTTP/1.1 207 Multi-Status</command>
      <body varUsage="globalVariableCollection,globalVariableServerName">
    
     &lt;?xml version="1.0" encoding="utf-8" ?&gt;
     &lt;multistatus xmlns="DAV:" xmlns:S="http://jakarta.apache.org/slide/"; &gt;
     &lt;response&gt;
     &lt;href&gt;/taminowebdavserver/&lt;/href&gt;
     &lt;propstat&gt;
     &lt;prop&gt;
     &lt;supportedlock&gt;
     &lt;lockentry&gt;
     &lt;lockscope&gt;
     &lt;exclusive/&gt;
     &lt;/lockscope&gt;
     &lt;locktype&gt;
     &lt;write/&gt;
     &lt;/locktype&gt;
     &lt;/lockentry&gt;
     &lt;lockentry&gt;
     &lt;lockscope&gt;
     &lt;shared/&gt;
     &lt;/lockscope&gt;
     &lt;locktype&gt;
     &lt;write/&gt;
     &lt;/locktype&gt;
     &lt;/lockentry&gt;
     &lt;/supportedlock&gt;
     &lt;supported-privilege-set&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;description&gt;Any operation&lt;/description&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;read/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Read any object&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;write/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Write any object&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;read-acl/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Read the ACL&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;write-acl/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Write the ACL&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;/supported-privilege&gt;
     &lt;/supported-privilege-set&gt;
     &lt;current-user-privilege-set&gt;
     &lt;privilege&gt;
     &lt;read/&gt;
     &lt;/privilege&gt;
     &lt;privilege&gt;
     &lt;write/&gt;
     &lt;/privilege&gt;
     &lt;privilege&gt;
     &lt;read-acl/&gt;
     &lt;/privilege&gt;
     &lt;privilege&gt;&lt;write-acl/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;/current-user-privilege-set&gt;
     &lt;acl&gt;
     &lt;ace&gt;
     
&lt;principal&gt;&lt;href&gt;/taminowebdavserver/administration/security/users&lt;/href&gt;&lt;/principal&gt;
     &lt;grant&gt;
     &lt;privilege&gt;
     &lt;all/&gt;
     &lt;/privilege&gt;
     &lt;/grant&gt;
     &lt;/ace&gt;
     &lt;/acl&gt;
     &lt;acl-semantics&gt;&lt;acl-sem&gt;
     &lt;ace-combination&gt;
     &lt;all-grant-before-any-deny/&gt;
     &lt;/ace-combination&gt;
     &lt;/acl-sem&gt;
     &lt;acl-sem&gt;
     &lt;required-principal&gt;
     &lt;all/&gt;
     &lt;/required-principal&gt;
     &lt;/acl-sem&gt;
     &lt;/acl-semantics&gt;
     &lt;principal-collection-set&gt;
     &lt;href&gt;/taminowebdavserver/administration/security/users&lt;/href&gt;
     &lt;/principal-collection-set&gt;
     &lt;owner&gt;
     &lt;href&gt;/administration/security/users/&lt;/href&gt;
     &lt;/owner&gt;
     &lt;resourcetype&gt;
     &lt;collection/&gt;
     &lt;/resourcetype&gt;
     &lt;source/&gt;
     &lt;displayname&gt;
     &lt;![CDATA[]]&gt;
     &lt;/displayname&gt;
     &lt;getlastmodified&gt;Mon, 11 Feb 2002 10:09:03 GMT&lt;/getlastmodified&gt;
     &lt;getcontentlength&gt;0&lt;/getcontentlength&gt;
     &lt;creationdate&gt;2002-02-11T10:09:03Z&lt;/creationdate&gt;
     &lt;/prop&gt;&lt;status&gt;HTTP/1.1 200 OK&lt;/status&gt;&lt;/propstat&gt;
     &lt;/response&gt;
     &lt;response&gt;
     &lt;href&gt;/%globalVariableServerName%/%globalVariableCollection%&lt;/href&gt;
     &lt;propstat&gt;
     &lt;prop&gt;
     &lt;supportedlock&gt;
     &lt;lockentry&gt;
     &lt;lockscope&gt;&lt;exclusive/&gt;
     &lt;/lockscope&gt;
     &lt;locktype&gt;
     &lt;write/&gt;
     &lt;/locktype&gt;
     &lt;/lockentry&gt;
     &lt;lockentry&gt;
     &lt;lockscope&gt;
     &lt;shared/&gt;
     &lt;/lockscope&gt;
     &lt;locktype&gt;
     &lt;write/&gt;&lt;/locktype&gt;
     &lt;/lockentry&gt;
     &lt;/supportedlock&gt;
     &lt;supported-privilege-set&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;description&gt;Any operation&lt;/description&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;read/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Read any object&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;write/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Write any object&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;read-acl/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Read the ACL&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;write-acl/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Write the ACL&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;/supported-privilege&gt;
     &lt;/supported-privilege-set&gt;
     &lt;current-user-privilege-set&gt;&lt;privilege&gt;&lt;read/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;
     &lt;write/&gt;
     &lt;/privilege&gt;
     &lt;privilege&gt;
     &lt;read-acl/&gt;
     &lt;/privilege&gt;
     &lt;privilege&gt;&lt;write-acl/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;/current-user-privilege-set&gt;
     &lt;acl&gt;
     &lt;ace&gt;
     &lt;principal&gt;
     &lt;href&gt;/taminowebdavserver/administration/security/users&lt;/href&gt;
     &lt;/principal&gt;
     &lt;grant&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;/grant&gt;
     &lt;protected/&gt;
     &lt;inherited&gt;
     &lt;href&gt;/taminowebdavserver/&lt;/href&gt;&lt;/inherited&gt;
     &lt;/ace&gt;
     &lt;/acl&gt;
     &lt;acl-semantics&gt;
     &lt;acl-sem&gt;
     &lt;ace-combination&gt;
     &lt;all-grant-before-any-deny/&gt;
     &lt;/ace-combination&gt;
     &lt;/acl-sem&gt;
     &lt;acl-sem&gt;
     &lt;required-principal&gt;
     &lt;all/&gt;
     &lt;/required-principal&gt;
     &lt;/acl-sem&gt;
     &lt;/acl-semantics&gt;
     &lt;principal-collection-set&gt;
     &lt;href&gt;/taminowebdavserver/administration/security/users&lt;/href&gt;
     &lt;/principal-collection-set&gt;
     &lt;owner&gt;
     &lt;href&gt;/administration/security/users/&lt;/href&gt;
     &lt;/owner&gt;
     &lt;getcontentlength&gt;0&lt;/getcontentlength&gt;
     &lt;resourcetype&gt;
     &lt;collection/&gt;
     &lt;/resourcetype&gt;
     &lt;source/&gt;
     &lt;getlastmodified&gt;Tue, 05 Feb 2002 09:48:12 GMT&lt;/getlastmodified&gt;
     &lt;displayname&gt;%globalVariableCollection%&lt;/displayname&gt;
     &lt;creationdate&gt;2002-02-05T09:48:12Z&lt;/creationdate&gt;
     
&lt;%globalVariableCollection%ContentId&gt;*empty*&lt;/%globalVariableCollection%ContentId&gt;
     &lt;modCount&gt;18&lt;/modCount&gt;
     &lt;/prop&gt;
     &lt;status&gt;HTTP/1.1 200 OK&lt;/status&gt;
     &lt;/propstat&gt;&lt;/response&gt;
     &lt;response&gt;
     &lt;href&gt;/taminowebdavserver/administration&lt;/href&gt;
     &lt;propstat&gt;
     &lt;prop&gt;
     &lt;supportedlock&gt;
     &lt;lockentry&gt;
     &lt;lockscope&gt;
     &lt;exclusive/&gt;
     &lt;/lockscope&gt;
     &lt;locktype&gt;
     &lt;write/&gt;
     &lt;/locktype&gt;
     &lt;/lockentry&gt;
     &lt;lockentry&gt;
     &lt;lockscope&gt;
     &lt;shared/&gt;
     &lt;/lockscope&gt;
     &lt;locktype&gt;
     &lt;write/&gt;
     &lt;/locktype&gt;
     &lt;/lockentry&gt;
     &lt;/supportedlock&gt;
     &lt;supported-privilege-set&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;&lt;all/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Any operation&lt;/description&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;read/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Read any object&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;write/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Write any object&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;read-acl/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Read the ACL&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;supported-privilege&gt;
     &lt;privilege&gt;
     &lt;write-acl/&gt;
     &lt;/privilege&gt;
     &lt;description&gt;Write the ACL&lt;/description&gt;
     &lt;/supported-privilege&gt;
     &lt;/supported-privilege&gt;
     &lt;/supported-privilege-set&gt;
     &lt;current-user-privilege-set&gt;
     &lt;privilege&gt;&lt;read/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;&lt;write/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;&lt;read-acl/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;&lt;write-acl/&gt;&lt;/privilege&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;/current-user-privilege-set&gt;
     &lt;acl&gt;
     &lt;ace&gt;
     
&lt;principal&gt;&lt;href&gt;/taminowebdavserver/administration/security/users&lt;/href&gt;
     &lt;/principal&gt;
     &lt;grant&gt;
     &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
     &lt;/grant&gt;
     &lt;protected/&gt;
     &lt;inherited&gt;
     &lt;href&gt;/taminowebdavserver/&lt;/href&gt;
     &lt;/inherited&gt;
     &lt;/ace&gt;
     &lt;/acl&gt;
     &lt;acl-semantics&gt;
     &lt;acl-sem&gt;
     &lt;ace-combination&gt;
     &lt;all-grant-before-any-deny/&gt;
     &lt;/ace-combination&gt;
     &lt;/acl-sem&gt;&lt;acl-sem&gt;
     &lt;required-principal&gt;&lt;all/&gt;&lt;/required-principal&gt;
     &lt;/acl-sem&gt;
     &lt;/acl-semantics&gt;
     &lt;principal-collection-set&gt;
     &lt;href&gt;/taminowebdavserver/administration/security/users&lt;/href&gt;
     &lt;/principal-collection-set&gt;
     &lt;owner&gt;
     &lt;href&gt;/administration/security/users/&lt;/href&gt;
     &lt;/owner&gt;
     &lt;resourcetype&gt;
     &lt;collection/&gt;
     &lt;/resourcetype&gt;
     &lt;source/&gt;
     &lt;displayname&gt;&lt;![CDATA[administration]]&gt;&lt;/displayname&gt;
     &lt;getlastmodified&gt;Mon, 11 Feb 2002 10:09:03 GMT&lt;/getlastmodified&gt;
     &lt;getcontentlength&gt;0&lt;/getcontentlength&gt;
     &lt;creationdate&gt;2002-02-11T10:09:03Z&lt;/creationdate&gt;
     &lt;/prop&gt;
     &lt;status&gt;HTTP/1.1 200 OK&lt;/status&gt;
     &lt;/propstat&gt;
     &lt;/response&gt;
     &lt;/multistatus&gt;
    </body>
    </response>
  </step>
  <step>
  <request>
      <command varUsage="globalVariableCollection,globalVariableServerName">DELETE 
/%globalVariableServerName%/%globalVariableCollection%/patient_1.xml 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 
1.1</header>
      <header>Connection: Keep-Alive</header>
      <body />
    </request>
    <response>
      <command>HTTP/1.1 204 No Content</command>
      <body />
    </response>
  </step>
  
  </test>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/propfind/propfindAclAllC.xml
  
  Index: propfindAclAllC.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
  <test>
  
  
  
  <specification>
                
                <abstract>Test to check acl property on a collection</abstract>
                
                <pre-Requisite></pre-Requisite>
                
                <description>1) Propfind on a collection with depth '0' to check for 
"acl" property.</description>
                
                <expectedResult>Property found by propFind .
                </expectedResult>
                
        </specification>
        
        
        
        
     <step>
           
      <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <header>Depth: 0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:acl/>
         </D:prop>
      </D:propfind>]]>
     </body>
    </request>
              
              <response>
                 <command>HTTP/1.0 207 Multi-Status</command>
                 <header>Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 
2.2; Java 1.3.0_02; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header> 
                 <body varUsage="globalVariableCollection,globalVariableServerName">
                 &lt;?xml version="1.0" encoding="utf-8" ?&gt;
              &lt;multistatus xmlns="DAV:" xmlns:S="http://jakarta.apache.org/slide/"; 
&gt;
              &lt;response&gt;
              
&lt;href&gt;/%globalVariableServerName%/%globalVariableCollection%&lt;/href&gt;
              &lt;propstat&gt;
              &lt;prop&gt;
              &lt;acl&gt;
              &lt;ace&gt;
              &lt;principal&gt;
              
&lt;href&gt;/%globalVariableServerName%/administration/security/users&lt;/href&gt;
              &lt;/principal&gt;
              &lt;grant&gt;
              &lt;privilege&gt;&lt;all/&gt;&lt;/privilege&gt;
              &lt;/grant&gt;
              &lt;protected/&gt;
              &lt;inherited&gt;
              &lt;href&gt;/%globalVariableServerName%/&lt;/href&gt;
              &lt;/inherited&gt;
              &lt;/ace&gt;
              &lt;/acl&gt;
              &lt;/prop&gt;
              &lt;status&gt;HTTP/1.1 200 OK&lt;/status&gt;
              &lt;/propstat&gt;
              &lt;/response&gt;
                &lt;/multistatus&gt;
              
              </body>
              </response>
     </step>
        
        
        
  </test>
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to