juergen 2003/11/18 00:38:48
Added: testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report
01_ACLPrincipalPropSet_UserAndGroupDisplaynameReport.xml
02_PrincipalPropertySearch_DisplaynameReport.xml
03_ACLPrincipalPropSet_ResourcetypeReport.xml
04_PrincipalMatch_OwnerReport.xml
05_PrincipalMatch_SelfReportWithDisplaynameAndOwner.xml
06_PrincipalMatch_SelfReportFromRoot.xml
Log:
add existing functional group tests to new location
Revision Changes Path
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report/01_ACLPrincipalPropSet_UserAndGroupDisplaynameReport.xml
Index: 01_ACLPrincipalPropSet_UserAndGroupDisplaynameReport.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by jhd (Software AG) -->
<test>
<specification>
<abstract> Test to check Report command on a file when acls are set to all,
group and user</abstract>
<description>
1) Prepare the test: MKCOL /test and PUT test.xml to it
2) ACL command on test.xml which
grants read and read-current-user-privilege-set to all,
grants write, write-acl and read-acl to current user,
grants write and read-acl to the group of the current user
3) REPORT command which obtains displaynames
</description>
<expectedResult> The (acl-principal-prop-set) Report returs the displayname
property for principal %user% and "administration/security/users" </expectedResult>
</specification>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.1</command>
<body fileReference="../../../contentDirectory/validXML.xm1" />
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">ACL
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<body
varUsage="globalVariableUsersColl,globalVariableGroupsColl,globalVariableGroup,globalVariableUserPath,globalVariableRootUserPath,globalVariableServerName,user,host"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:href>%globalVariableRootUserPath%</D:href>
</D:principal>
<D:grant>
<D:privilege>
<D:read />
</D:privilege>
<D:privilege>
<D:read-current-user-privilege-set />
</D:privilege>
</D:grant>
</D:ace>
<D:ace>
<D:principal>
<D:href>%globalVariableRootUserPath%/%globalVariableUsersColl%/%user%</D:href>
</D:principal>
<D:grant>
<D:privilege>
<D:write />
</D:privilege>
<D:privilege>
<D:write-acl />
</D:privilege>
<D:privilege>
<D:read-acl />
</D:privilege>
</D:grant>
</D:ace>
<D:ace>
<D:principal>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%0</D:href>
</D:principal>
<D:grant>
<D:privilege>
<D:write />
</D:privilege>
<D:privilege>
<D:read-acl />
</D:privilege>
</D:grant>
</D:ace>
</D:acl>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
<step>
<user varUsage="user">%user%</user>
<password varUsage="user">%user%</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">REPORT
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.0</command>
<header>Content-Type: text/xml; charset="utf-8"</header>
<header>Depth: 0</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<D:acl-principal-prop-set xmlns:D="DAV:">
<D:prop>
<D:displayname />
</D:prop>
</D:acl-principal-prop-set>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableUsersColl,globalVariableGroupsColl,globalVariableGroup,globalVariableRootUserPath,globalVariableUserPath,globalVariableServerName,user,host"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableUsersColl%/%user%2</D:href>
<D:propstat>
<D:prop>
<D:displayname>%user%2</D:displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>%globalVariableRootUserPath%</D:href>
<D:propstat>
<D:prop>
<D:displayname>all</D:displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%0</D:href>
<D:propstat>
<D:prop>
<D:displayname>%globalVariableGroup%0</D:displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<!-- input test of read privilege -->
<cleanup>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">ACL
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<body
varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:acl xmlns:D="DAV:" />
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command
varUsage="repeatCounter,globalVariableCollection,globalVariableServerName">DELETE
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report/02_PrincipalPropertySearch_DisplaynameReport.xml
Index: 02_PrincipalPropertySearch_DisplaynameReport.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Test to check Report command on a group collection to get displayname
of a searched user</abstract>
<description>
1) REPORT .../groups/%globalVariableGroupsColl%2
</description>
<expectedResult> The Report should return the displayname of all principal
matching the search string</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableRootUserPath,globalVariableGroupsColl,globalVariableGroup,globalVariableServerName">REPORT
%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%2
HTTP/1.0</command>
<header>Content-Type: text/html; charset="utf-8"</header>
<header>Depth: INFINITY</header>
<body
varUsage="globalVariableGroup,globalVariableGroupsColl,globalVariableServerName,user"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:principal-property-search xmlns:D="DAV:">
<D:property-search>
<D:prop>
<D:displayname />
</D:prop>
<D:caseless-substring>2%globalVariableGroup%2</D:caseless-substring>
</D:property-search>
<D:prop>
<D:displayname />
</D:prop>
</D:principal-property-search>
]]></body>
</request>
<response>
<command>HTTP/1.1 207 Multi-Status</command>
<body
varUsage="globalVariableGroup,globalVariableGroupsColl,globalVariableUsersColl,globalVariableRootUserPath,globalVariableUserPath,globalVariableServerName,user,host"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%2/2%globalVariableGroup%2%user%</D:href>
<D:propstat>
<D:prop>
<D:displayname>2%globalVariableGroup%2%user%</D:displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableUsersColl%/2%globalVariableGroup%2%user%</D:href>
<D:propstat>
<D:prop>
<D:displayname>2%globalVariableGroup%2%user%</D:displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report/03_ACLPrincipalPropSet_ResourcetypeReport.xml
Index: 03_ACLPrincipalPropSet_ResourcetypeReport.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Check REPORT for acl (deny all ) on a group </abstract>
<description>
1) prepare test: MKCOL /test, ACL command which denies all access to
the user %globalVariableGroupsColl%1 on /test
3) REPORT command which obtains information about /test
</description>
<expectedResult> The (acl-principal-prop-set) Report returns resourcetype
property for principal %globalVariableGroupsColl% and
"administration/security/userdb" </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">ACL
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<body
varUsage="globalVariableRootUserPath,globalVariableGroupsColl,globalVariableGroup,globalVariableServerName,user"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%1</D:href>
</D:principal>
<D:deny>
<D:privilege>
<D:all />
</D:privilege>
</D:deny>
</D:ace>
</D:acl>
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">REPORT
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.0</command>
<header>Content-Type: text/xml; charset="utf-8"</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<D:acl-principal-prop-set xmlns:D="DAV:">
<D:prop>
<D:resourcetype />
</D:prop>
</D:acl-principal-prop-set>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableRootUserPath,globalVariableGroupsColl,globalVariableGroup,globalVariableServerName"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href varUsage="globalVariableServerName">%globalVariableRootUserPath%</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:collection />
<D:principal />
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%1</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:collection />
<D:principal />
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<!-- input test of read privilege -->
<cleanup>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">ACL
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<body
varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:acl xmlns:D="DAV:" />
]]></body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command
varUsage="repeatCounter,globalVariableCollection,globalVariableServerName">DELETE
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report/04_PrincipalMatch_OwnerReport.xml
Index: 04_PrincipalMatch_OwnerReport.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract>Check REPORT for principal-match (owner) on a collection when two
different users make his own collection </abstract>
<description>
1) prepare test: (usr)MKCOL /test1, (usr2)MKCOL /test2
2) (usr) REPORT command which obtains objects owned by usr
3) (usr2) REPORT command which obtains objects owned by usr2
</description>
<expectedResult> The (acl-principal-prop-set) Report returns resourcetype
property for principal %globalVariableGroupsColl,globalVariableGroup,% and
"administration/security/userdb" </expectedResult>
</specification>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL
/%globalVariableServerName%/%globalVariableCollection%/test1 HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">MKCOL
/%globalVariableServerName%/%globalVariableCollection%/test2 HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
</response>
</step>
<step>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">REPORT
/%globalVariableServerName%/%globalVariableCollection% HTTP/1.0</command>
<header>Content-Type: text/html; charset="utf-8"</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<D:principal-match xmlns:D="DAV:">
<D:principal-property>
<D:owner />
</D:principal-property>
</D:principal-match>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableGroupsColl,globalVariableGroup,globalVariableServerName,globalVariableCollection"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/test1</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<step>
<user varUsage="user">%user%2</user>
<password varUsage="user">%user%2</password>
<request>
<command varUsage="globalVariableCollection,globalVariableServerName">REPORT
/%globalVariableServerName%/%globalVariableCollection% HTTP/1.0</command>
<header>Content-Type: text/xml; charset="utf-8"</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<D:principal-match xmlns:D="DAV:">
<D:principal-property>
<D:owner />
</D:principal-property>
</D:principal-match>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableGroupsColl,globalVariableGroup,globalVariableServerName,globalVariableCollection"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/test2</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
<cleanup>
<step>
<request>
<command
varUsage="repeatCounter,globalVariableCollection,globalVariableServerName">DELETE
/%globalVariableServerName%/%globalVariableCollection%/test1 HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
<step>
<request>
<command
varUsage="repeatCounter,globalVariableCollection,globalVariableServerName">DELETE
/%globalVariableServerName%/%globalVariableCollection%/test2 HTTP/1.1</command>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
</response>
</step>
</cleanup>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report/05_PrincipalMatch_SelfReportWithDisplaynameAndOwner.xml
Index: 05_PrincipalMatch_SelfReportWithDisplaynameAndOwner.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Test to check REPORT command </abstract>
<description>
1) REPORT command which obtains information about the resource
</description>
<expectedResult> When DAV:self element is issued in DAV:principal-match, against
a group, it returns all the collections where the user (principal) is a member of
those collections </expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableRootUserPath,globalVariableGroupsColl,globalVariableGroup,globalVariableServerName,user">REPORT
%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%0
HTTP/1.0</command>
<header>Content-Type: text/xml; charset="utf-8"</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<D:principal-match xmlns:D="DAV:">
<D:self />
<D:prop>
<D:displayname />
<D:owner />
</D:prop>
</D:principal-match>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableRootUserPath,globalVariableGroupsColl,globalVariableUsersColl,globalVariableGroup,globalVariableServerName,user"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%0/%user%</D:href>
<D:propstat>
<D:prop>
<D:displayname>%user%</D:displayname>
<D:owner>
<D:href>%globalVariableRootUserPath%/%globalVariableUsersColl%/%user%</D:href>
</D:owner>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/groups/Report/06_PrincipalMatch_SelfReportFromRoot.xml
Index: 06_PrincipalMatch_SelfReportFromRoot.xml
===================================================================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test SYSTEM "../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Test to check REPORT command </abstract>
<description>
1) REPORT command which obtains information about the resource
</description>
<expectedResult> When DAV:self element is issued in DAV:principal-match, against
a group, it returns all the collections where the user (principal) is a member of
those collections </expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableGroupsColl,globalVariableServerName,user">REPORT
/%globalVariableServerName% HTTP/1.0</command>
<header>Content-Type: text/xml; charset="utf-8"</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<D:principal-match xmlns:D="DAV:">
<D:self />
</D:principal-match>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body
varUsage="globalVariableRootUserPath,globalVariableGroupsColl,globalVariableUsersColl,globalVariableGroup,globalVariableServerName,user"><![CDATA[<?xml
version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableUsersColl%/%user%</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
<D:response>
<D:href>%globalVariableRootUserPath%/%globalVariableGroupsColl%/%globalVariableGroup%0/%user%</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
</D:multistatus>
]]></body>
</response>
</step>
</test>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]