[CalendarServer-changes] [13891] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Aug 18 18:13:55 PDT 2014
Revision: 13891
http://trac.calendarserver.org//changeset/13891
Author: cdaboo at apple.com
Date: 2014-08-18 18:13:55 -0700 (Mon, 18 Aug 2014)
Log Message:
-----------
Add test to make sure transp property is returned in sync REPORT and that Prefer is honored with sync REPORT.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CalDAV/sync-report.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CalDAV/reports/sync/22.xml
CalDAVTester/trunk/Resource/CalDAV/reports/sync/23.xml
CalDAVTester/trunk/Resource/CalDAV/reports/sync/24.xml
CalDAVTester/trunk/Resource/Common/PROPPATCH/calendar-transp-transparent.xml
Added: CalDAVTester/trunk/Resource/CalDAV/reports/sync/22.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/sync/22.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/sync/22.xml 2014-08-19 01:13:55 UTC (rev 13891)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:sync-token/>
+<D:sync-level>1</D:sync-level>
+<D:prop>
+ <C:schedule-calendar-transp />
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CalDAV/reports/sync/23.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/sync/23.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/sync/23.xml 2014-08-19 01:13:55 UTC (rev 13891)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:sync-token>$synctoken1:</D:sync-token>
+<D:sync-level>1</D:sync-level>
+<D:prop>
+ <C:schedule-calendar-transp />
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CalDAV/reports/sync/24.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/sync/24.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/sync/24.xml 2014-08-19 01:13:55 UTC (rev 13891)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:sync-token />
+<D:sync-level>1</D:sync-level>
+<D:prop>
+ <C:foobar />
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/Common/PROPPATCH/calendar-transp-transparent.xml
===================================================================
--- CalDAVTester/trunk/Resource/Common/PROPPATCH/calendar-transp-transparent.xml (rev 0)
+++ CalDAVTester/trunk/Resource/Common/PROPPATCH/calendar-transp-transparent.xml 2014-08-19 01:13:55 UTC (rev 13891)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:schedule-calendar-transp><C:transparent/></C:schedule-calendar-transp>
+</D:prop>
+</D:set>
+</D:propertyupdate>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/sync-report.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sync-report.xml 2014-08-19 01:12:36 UTC (rev 13890)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sync-report.xml 2014-08-19 01:13:55 UTC (rev 13891)
@@ -3982,6 +3982,245 @@
</test>
</test-suite>
+
+ <test-suite name='schedule-calendar-transp in response - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/22.xml</filepath>
+ </data>
+ <verify>
+ <exclude-feature>
+ <feature>split-calendars</feature>
+ </exclude-feature>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>ignoremissing</name>
+ </arg>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar:/</value>
+ <value>$inbox:/</value>
+ <value>$outbox:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <require-feature>
+ <feature>split-calendars</feature>
+ </require-feature>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>ignoremissing</name>
+ </arg>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar:/</value>
+ <value>$tasks:/</value>
+ <value>$inbox:/</value>
+ <value>$outbox:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>opaque</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Change property on calendar</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPPATCH/calendar-transp-transparent.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp</value>
+ </arg>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>transparent</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Reset the property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPPATCH/calendar-transp-opaque.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp</value>
+ </arg>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>opaque</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+
+
+ <test-suite name='Prefer:return=minimal - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - no minimal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>foobar</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>initial query - with minimal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <header>
+ <name>Prefer</name>
+ <value>return=minimal</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>notcontains</name>
+ <value>foobar</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+
<test-suite name='limited reports'>
<test name='1'>
<exclude-feature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140818/5705f0f7/attachment-0001.html>
More information about the calendarserver-changes
mailing list