[CalendarServer-changes] [2523] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jun 2 16:31:27 PDT 2008
Revision: 2523
http://trac.macosforge.org/projects/calendarserver/changeset/2523
Author: cdaboo at apple.com
Date: 2008-06-02 16:31:26 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
Tests for the DAV:current-user-principal property.
(http://tools.ietf.org/html/draft-sanchez-webdav-current-principal-01)
Added Paths:
-----------
CalDAVTester/trunk/Resource/current-user-principal/
CalDAVTester/trunk/Resource/current-user-principal/1.xml
CalDAVTester/trunk/scripts/tests/current-user-principal.xml
Added: CalDAVTester/trunk/Resource/current-user-principal/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/current-user-principal/1.xml (rev 0)
+++ CalDAVTester/trunk/Resource/current-user-principal/1.xml 2008-06-02 23:31:26 UTC (rev 2523)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:current-user-principal/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/trunk/scripts/tests/current-user-principal.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/current-user-principal.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/current-user-principal.xml 2008-06-02 23:31:26 UTC (rev 2523)
@@ -0,0 +1,167 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ DRI: Cyrus Daboo, cdaboo at apple.com
+ -->
+
+<caldavtest>
+ <description>Test DAV:current-user-principal support</description>
+
+ <start/>
+
+ <test-suite name='Check for the property on /' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-principal$<href>$principaluri1:</href></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Check for unauthenticated property on /</description>
+ <request auth="no">
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-principal$<unauthenticated/></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-principal$<href>$principaluri2:</href></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Check for the property on /principals/' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$principals:</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-principal$<href>$principaluri1:</href></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Check for unauthenticated property on /</description>
+ <request auth="no">
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$principals:</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>401</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$principals:</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-principal$<href>$principaluri2:</href></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080602/d453de5a/attachment.htm
More information about the calendarserver-changes
mailing list