[CalendarServer-changes] [4761] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 18 09:28:43 PST 2009
Revision: 4761
http://trac.macosforge.org/projects/calendarserver/changeset/4761
Author: cdaboo at apple.com
Date: 2009-11-18 09:28:43 -0800 (Wed, 18 Nov 2009)
Log Message:
-----------
Test simple scheduling with multiple auto-accept resources.
Modified Paths:
--------------
CalDAVTester/trunk/verifiers/calendarDataMatch.py
Added Paths:
-----------
CalDAVTester/trunk/Resource/implicit/automultiple/
CalDAVTester/trunk/Resource/implicit/automultiple/suite1/
CalDAVTester/trunk/Resource/implicit/automultiple/suite1/1.ics
CalDAVTester/trunk/Resource/implicit/automultiple/suite1/2.ics
CalDAVTester/trunk/Resource/implicit/automultiple/suite1/3.ics
CalDAVTester/trunk/Resource/implicit/automultiple/suite1/4.ics
CalDAVTester/trunk/scripts/tests/implicitautomultiple.xml
Added: CalDAVTester/trunk/Resource/implicit/automultiple/suite1/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/implicit/automultiple/suite1/1.ics (rev 0)
+++ CalDAVTester/trunk/Resource/implicit/automultiple/suite1/1.ics 2009-11-18 17:28:43 UTC (rev 4761)
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VEVENT
+UID:event-1
+DTSTART:20091201T080000Z
+DTEND:20091201T090000Z
+ATTENDEE;CN=$username1:;PARTSTAT=ACCEPTED:$cuaddralt1:
+ATTENDEE;CN=$username2:;RSVP=TRUE:$cuaddralt2:
+ATTENDEE;CN=$resourcename1::$rcuaddralt1:
+ATTENDEE;CN=$resourcename2::$rcuaddralt2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1::$cuaddralt1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/implicit/automultiple/suite1/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/implicit/automultiple/suite1/2.ics (rev 0)
+++ CalDAVTester/trunk/Resource/implicit/automultiple/suite1/2.ics 2009-11-18 17:28:43 UTC (rev 4761)
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VEVENT
+UID:event-1
+DTSTART:20091201T080000Z
+DTEND:20091201T090000Z
+ATTENDEE;CN=$username1:;PARTSTAT=ACCEPTED;EMAIL=$email1::$cuaddrurn1:
+ATTENDEE;CN=$username2:;RSVP=TRUE;SCHEDULE-STATUS=1.2;EMAIL=$email2::$cuaddrurn2:
+ATTENDEE;CN=$resourcename1:;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:$rcuaddrurn1:
+ATTENDEE;CN=$resourcename2:;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:$rcuaddrurn2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/implicit/automultiple/suite1/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/implicit/automultiple/suite1/3.ics (rev 0)
+++ CalDAVTester/trunk/Resource/implicit/automultiple/suite1/3.ics 2009-11-18 17:28:43 UTC (rev 4761)
@@ -0,0 +1,21 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:event-1
+DTSTART:20091201T080000Z
+DTEND:20091201T090000Z
+ATTENDEE;CN=$username1:;PARTSTAT=ACCEPTED;EMAIL=$email1::$cuaddrurn1:
+ATTENDEE;CN=$username2:;RSVP=TRUE;EMAIL=$email2::$cuaddrurn2:
+ATTENDEE;CN=$resourcename1:;PARTSTAT=ACCEPTED:$rcuaddrurn1:
+ATTENDEE;CN=$resourcename2:;PARTSTAT=ACCEPTED:$rcuaddrurn2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:TRANSPARENT
+X-APPLE-NEEDS-REPLY:TRUE
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/implicit/automultiple/suite1/4.ics
===================================================================
--- CalDAVTester/trunk/Resource/implicit/automultiple/suite1/4.ics (rev 0)
+++ CalDAVTester/trunk/Resource/implicit/automultiple/suite1/4.ics 2009-11-18 17:28:43 UTC (rev 4761)
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:event-1
+DTSTART:20091201T080000Z
+DTEND:20091201T090000Z
+ATTENDEE;CN=$username1:;PARTSTAT=ACCEPTED;EMAIL=$email1::$cuaddrurn1:
+ATTENDEE;CN=$username2:;RSVP=TRUE;EMAIL=$email2::$cuaddrurn2:
+ATTENDEE;CN=$resourcename1:;PARTSTAT=ACCEPTED:$rcuaddrurn1:
+ATTENDEE;CN=$resourcename2:;PARTSTAT=ACCEPTED:$rcuaddrurn2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/scripts/tests/implicitautomultiple.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/implicitautomultiple.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/implicitautomultiple.xml 2009-11-18 17:28:43 UTC (rev 4761)
@@ -0,0 +1,259 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2009 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 implicit scheduling for multiple auto-accept locations</description>
+
+ <require-feature>
+ <feature>auto-accept</feature>
+ <feature>implicit-scheduling</feature>
+ </require-feature>
+
+ <start>
+ <request user="$userid1:" pswd="$pswd1:">
+ <method>GET</method>
+ <ruri>$calendarpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$calendarpath2:/</ruri>
+ </request>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$rinboxpath1:/</ruri>
+ </request>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$rcalendarpath1:/</ruri>
+ </request>
+ </start>
+
+ <test-suite name='#1 Non-recurring without conflict' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Create new event</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/implicit/automultiple/suite1/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELAY</method>
+ <ruri>4</ruri>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>One item in user01 Inbox</description>
+ <request print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$inboxpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/implicit/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>2</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>One item in user01 Calendar</description>
+ <request print-response="no">
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/implicit/automultiple/suite1/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>One item in user02 Inbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$inboxpath2:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/implicit/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>1</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>One item in user02 calendar</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>GETNEW</method>
+ <ruri>$calendarpath2:/</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/implicit/automultiple/suite1/3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>No items in resource01 Inbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$rinboxpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/implicit/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>One item in resource01 Calendar</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>GETNEW</method>
+ <ruri>$rcalendarpath1:/</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/implicit/automultiple/suite1/4.ics</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>ORGANIZER:SCHEDULE-STATUS</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>No items in resource02 Inbox</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>PROPFIND</method>
+ <ruri>$rinboxpath2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/implicit/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>count</name>
+ <value>0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>One item in resource02 Calendar</description>
+ <request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+ <method>GETNEW</method>
+ <ruri>$rcalendarpath2:/</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/implicit/automultiple/suite1/4.ics</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>ORGANIZER:SCHEDULE-STATUS</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <description>Clean-up inboxes</description>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$rinboxpath1:/</ruri>
+ </request>
+ </test>
+ </test-suite>
+
+ <end>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath2:/</ruri>
+ </request>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$rinboxpath1:/</ruri>
+ </request>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$rcalendarpath1:/</ruri>
+ </request>
+ </end>
+
+</caldavtest>
Modified: CalDAVTester/trunk/verifiers/calendarDataMatch.py
===================================================================
--- CalDAVTester/trunk/verifiers/calendarDataMatch.py 2009-11-18 05:07:02 UTC (rev 4760)
+++ CalDAVTester/trunk/verifiers/calendarDataMatch.py 2009-11-18 17:28:43 UTC (rev 4761)
@@ -1,5 +1,5 @@
##
-# Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+# Copyright (c) 2006-2009 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.
@@ -28,6 +28,7 @@
def verify(self, manager, uri, response, respdata, args): #@UnusedVariable
# Get arguments
files = args.get("filepath", [])
+ filters = args.get("filter", [])
# status code must be 200, 207
if response.status not in (200,207):
@@ -69,6 +70,16 @@
elif item.name == "X-CALENDARSERVER-ATTENDEE-COMMENT":
if item.params.has_key("X-CALENDARSERVER-DTSTAMP"):
item.params["X-CALENDARSERVER-DTSTAMP"] = ["20080101T000000Z"]
+
+ for filter in filters:
+ if ":" in filter:
+ property, parameter = filter.split(":")
+ if item.name == property:
+ if item.params.has_key(parameter):
+ del item.params[parameter]
+ else:
+ if item.name == filter:
+ component.remove(item)
s = StringIO.StringIO(respdata)
try:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091118/d08c46ae/attachment-0001.html>
More information about the calendarserver-changes
mailing list