[CalendarServer-changes] [5276] CalDAVTester/branches/users/cdaboo/sharing-5228
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 10 07:29:32 PST 2010
Revision: 5276
http://trac.macosforge.org/projects/calendarserver/changeset/5276
Author: cdaboo at apple.com
Date: 2010-03-10 07:29:31 -0800 (Wed, 10 Mar 2010)
Log Message:
-----------
Tests for sharing invite replies.
Added Paths:
-----------
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/1.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/2.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/3.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/4.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/5.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/1.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/2.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/3.xml
CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/1.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/1.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/1.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+ <CS:set>
+ <D:href>mailto:user02 at example.com</D:href>
+ <CS:summary>My Shared Calendar</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/2.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/2.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/2.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+ <dtstamp></dtstamp>
+ <uid></uid>
+ <sequence>1</sequence>
+ <invite-notification>
+ <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+ <invite-noresponse/>
+ <access>
+ <read-write/>
+ </access>
+ <hosturl>
+ <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+ </hosturl>
+ <resourcetype xmlns="DAV:">
+ <collection />
+ <calendar xmlns="urn:ietf:params:xml:ns:caldav" />
+ </resourcetype>
+ <organizer>
+ <href xmlns='DAV:'>/principals/__uids__/user01/</href>
+ </organizer>
+ <summary>My Shared Calendar</summary>
+ </invite-notification>
+</notification>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/3.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/3.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/3.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-notification xmlns='http://calendarserver.org/ns/'>
+ <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+ <uid>$inviteuid:</uid>
+ <invite-accepted/>
+ <hosturl>
+ <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+ </hosturl>
+ <summary>The Shared Calendar</summary>
+</invite-notification>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/4.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/4.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/4.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+<D:prop>
+<CS:invite/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/5.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/5.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/5.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?><multistatus xmlns='DAV:'>
+ <response>
+ <href>/calendars/__uids__/user01/shared/</href>
+ <propstat>
+ <prop>
+ <invite xmlns='http://calendarserver.org/ns/'>
+ <user>
+ <uid></uid>
+ <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+ <access>
+ <read-write/>
+ </access>
+ <invite-accepted/>
+ </user>
+ </invite>
+ </prop>
+ <status>HTTP/1.1 200 OK</status>
+ </propstat>
+ </response>
+</multistatus>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/1.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/1.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/1.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-notification xmlns='http://calendarserver.org/ns/'>
+ <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+ <uid>$inviteuid:</uid>
+ <invite-declined/>
+ <hosturl>
+ <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+ </hosturl>
+ <summary>The Shared Calendar</summary>
+</invite-notification>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/2.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/2.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/2.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+<D:prop>
+<CS:invite/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/3.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/3.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/decline/3.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?><multistatus xmlns='DAV:'>
+ <response>
+ <href>/calendars/__uids__/user01/shared/</href>
+ <propstat>
+ <prop>
+ <invite xmlns='http://calendarserver.org/ns/'>
+ <user>
+ <uid></uid>
+ <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+ <access>
+ <read-write/>
+ </access>
+ <invite-declined/>
+ </user>
+ </invite>
+ </prop>
+ <status>HTTP/1.1 200 OK</status>
+ </propstat>
+ </response>
+</multistatus>
Added: CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml 2010-03-10 15:29:31 UTC (rev 5276)
@@ -0,0 +1,180 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 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.
+ -->
+
+<caldavtest>
+ <description>Test calendar sharing replies</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>shared-calendars</feature>
+ </require-feature>
+
+ <start>
+ <request user="$userid1:" pswd="$pswd1:">
+ <method>DELETEALL</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$pathprefix1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/MKCALENDAR/sharedcalendar.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </start>
+
+ <test-suite name='Send first reply'>
+ <test name='1' ignore='no'>
+ <description>POST invitation</description>
+ <request print-response='no'>
+ <method>POST</method>
+ <ruri>$pathprefix1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/replies/accept/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Check Sharee notification collection</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>GETNEW</method>
+ <ruri>$notificationpath2:/</ruri>
+ <verify>
+ <callback>xmlDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/replies/accept/2.xml</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>{http://calendarserver.org/ns/}dtstamp</value>
+ <value>{http://calendarserver.org/ns/}uid</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Sharee replies ACCEPTED</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>POST</method>
+ <ruri>$pathprefix2:/</ruri>
+ <data substitutions='yes'>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/replies/accept/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>Check accept status</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/shared/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/replies/accept/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/replies/accept/5.xml</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>{http://calendarserver.org/ns/}uid</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Update reply'>
+ <test name='1'>
+ <description>Sharee replies DECLINED</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>POST</method>
+ <ruri>$pathprefix2:/</ruri>
+ <data substitutions='yes'>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/replies/decline/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Check declined status</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/shared/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/replies/decline/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/replies/decline/3.xml</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>{http://calendarserver.org/ns/}uid</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/20100310/7c07ce19/attachment-0001.html>
More information about the calendarserver-changes
mailing list