[CalendarServer-changes] [5484] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu Apr 15 14:07:31 PDT 2010
Revision: 5484
http://trac.macosforge.org/projects/calendarserver/changeset/5484
Author: cdaboo at apple.com
Date: 2010-04-15 14:07:30 -0700 (Thu, 15 Apr 2010)
Log Message:
-----------
Global address book tests.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
CalDAVTester/trunk/scripts/server/serverinfo-template.xml
CalDAVTester/trunk/scripts/server/serverinfo.xml
CalDAVTester/trunk/scripts/server/sslserverinfo.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/1.xml
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/2.vcf
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/3.xml
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/4.xml
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/5.vcf
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/6.xml
CalDAVTester/trunk/Resource/CardDAV/global-addressbook/7.xml
CalDAVTester/trunk/scripts/tests/CardDAV/global-addressbook.xml
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/1.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/1.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/2.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/2.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/2.vcf 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,17 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Contact;Mulberry;;;
+FN:Mulberry Contact
+NICKNAME:mulberry
+ORG:Apple Inc.;
+EMAIL;type=INTERNET;type=WORK;type=pref:mulberry_contact at example.com
+TEL;type=HOME;type=pref:555-555-5555
+TEL;type=WORK:555-555-5555
+TEL;type=WORK;type=FAX:555-555-5555
+item1.ADR;type=WORK;type=pref:;;1 Infinite Circle;Exampletino\, CA 99999;USA;;
+item1.X-ABADR:us
+NOTE:This is a contact created in Mulberry.
+item2.URL;type=pref:http://www.example.com/~magic
+item2.X-ABLabel:_$!<HomePage>!$_
+UID:782DAAF92CB1ED1BC155CDB3 at D76FAF7B10D9E8D2D41F779D
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/3.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/3.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1-1:</D:sync-token>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/4.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/4.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2-1:</D:sync-token>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/5.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/5.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/5.vcf 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,18 @@
+BEGIN:VCARD
+VERSION:3.0
+N:InfoIn;All;;;
+FN:All InfoIn
+ORG:allinfo Company;
+EMAIL;type=INTERNET;type=WORK;type=pref:allinfomationin at example.com
+TEL;type=WORK;type=pref:555-555-5555
+TEL;type=CELL:555-555-5555
+item1.ADR;type=WORK;type=pref:;;1 Happy Street Apt #2;Mountain Top;CA;99999;USA
+item1.X-ABADR:us
+X-YAHOO;type=WORK;type=pref:saeko.where at example.com
+X-YAHOO-ID;type=WORK;type=pref:saeko.where at example.com
+item2.X-ABRELATEDNAMES;type=pref:May Tan
+item2.X-ABLabel:_$!<Friend>!$_
+item3.X-ABRELATEDNAMES:Shane
+item3.X-ABLabel:_$!<Assistant>!$_
+UID:3765A955-1B96-41EA-994D-335192BEDCCD:ABPerson
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/6.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/6.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/6.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1-2:</D:sync-token>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/global-addressbook/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/global-addressbook/7.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/global-addressbook/7.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2-2:</D:sync-token>
+</D:sync-collection>
Modified: CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml 2010-04-15 21:04:38 UTC (rev 5483)
+++ CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -36,7 +36,7 @@
<feature>principal-property-search REPORT</feature> <!-- ACL principal-property-search REPORT -->
<feature>principal-search-property-set REPORT</feature> <!-- ACL principal-search-property-set REPORT -->
- <!-- <feature>add-member</feature> --> <!-- Add-member used to create resources -->
+ <feature>add-member</feature> <!-- Add-member used to create resources -->
<feature>ctag</feature> <!-- ctag extension -->
<feature>current-user-principal</feature> <!-- current-user-principal extension -->
<feature>directory listing</feature> <!-- GET on collection -->
@@ -44,7 +44,7 @@
<feature>expand-property</feature> <!-- Expand property REPORT -->
<feature>quota</feature> <!-- WebDAV QUOTA -->
<feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
- <!-- <feature>well-known</feature> --> <!-- well-known feature -->
+ <feature>well-known</feature> <!-- well-known feature -->
<!-- CalDAV specific extension -->
<feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
@@ -58,13 +58,14 @@
<feature>private-events</feature> <!-- private-events extension -->
<feature>proxy</feature> <!-- calendar-user-proxy extension -->
<feature>proxy-authz</feature> <!-- sudo user extension -->
+ <feature>shared-calendars</feature> <!-- Shared calendars extension -->
<feature>schedule-changes</feature> <!-- schedule-changes property extension -->
- <feature>shared-calendars</feature> <!-- Shared calendars extension -->
<feature>timezone-service</feature> <!-- Timezone service extension -->
<feature>vavailability</feature> <!-- VAVAILABILITY on inbox -->
<!-- CardDAV specific extension -->
- <!-- <feature>carddav</feature> --> <!-- Basic CardDAV feature enabler -->
+ <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>global-addressbook</feature> <!-- Global address book for each user -->
</features>
@@ -226,18 +227,24 @@
<value>$addressbooks:$groupstype:/</value>
</substitution>
- <!-- primary calendar name-->
+ <!-- primary addressbook name -->
<substitution>
<key>$addressbook:</key>
<value>addressbook</value>
</substitution>
- <!-- directory name-->
+ <!-- directory name -->
<substitution>
<key>$directory:</key>
<value>$root:directory/</value>
</substitution>
+ <!-- global-addressbook name -->
+ <substitution>
+ <key>$global_addressbook:</key>
+ <value>global-addressbook</value>
+ </substitution>
+
<!-- user id for admin user -->
<substitution>
<key>$useradmin:</key>
Modified: CalDAVTester/trunk/scripts/server/serverinfo-template.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-template.xml 2010-04-15 21:04:38 UTC (rev 5483)
+++ CalDAVTester/trunk/scripts/server/serverinfo-template.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -58,13 +58,14 @@
<feature>private-events</feature> <!-- private-events extension -->
<feature>proxy</feature> <!-- calendar-user-proxy extension -->
<feature>proxy-authz</feature> <!-- sudo user extension -->
+ <feature>shared-calendars</feature> <!-- Shared calendars extension -->
<feature>schedule-changes</feature> <!-- schedule-changes property extension -->
- <feature>shared-calendars</feature> <!-- Shared calendars extension -->
<feature>timezone-service</feature> <!-- Timezone service extension -->
<feature>vavailability</feature> <!-- VAVAILABILITY on inbox -->
<!-- CardDAV specific extension -->
- <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>global-addressbook</feature> <!-- Global address book for each user -->
</features>
@@ -226,18 +227,24 @@
<value>$addressbooks:$groupstype:/</value>
</substitution>
- <!-- primary calendar name-->
+ <!-- primary addressbook name -->
<substitution>
<key>$addressbook:</key>
<value>addressbook</value>
</substitution>
- <!-- directory name-->
+ <!-- directory name -->
<substitution>
<key>$directory:</key>
<value>$root:directory/</value>
</substitution>
+ <!-- global-addressbook name -->
+ <substitution>
+ <key>$global_addressbook:</key>
+ <value>global-addressbook</value>
+ </substitution>
+
<!-- user id for admin user -->
<substitution>
<key>$useradmin:</key>
Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.xml 2010-04-15 21:04:38 UTC (rev 5483)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -65,6 +65,7 @@
<!-- CardDAV specific extension -->
<feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>global-addressbook</feature> <!-- Global address book for each user -->
</features>
@@ -226,18 +227,24 @@
<value>$addressbooks:$groupstype:/</value>
</substitution>
- <!-- primary calendar name-->
+ <!-- primary addressbook name -->
<substitution>
<key>$addressbook:</key>
<value>addressbook</value>
</substitution>
- <!-- directory name-->
+ <!-- directory name -->
<substitution>
<key>$directory:</key>
<value>$root:directory/</value>
</substitution>
+ <!-- global-addressbook name -->
+ <substitution>
+ <key>$global_addressbook:</key>
+ <value>global-addressbook</value>
+ </substitution>
+
<!-- user id for admin user -->
<substitution>
<key>$useradmin:</key>
Modified: CalDAVTester/trunk/scripts/server/sslserverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/sslserverinfo.xml 2010-04-15 21:04:38 UTC (rev 5483)
+++ CalDAVTester/trunk/scripts/server/sslserverinfo.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -37,7 +37,7 @@
<feature>principal-property-search REPORT</feature> <!-- ACL principal-property-search REPORT -->
<feature>principal-search-property-set REPORT</feature> <!-- ACL principal-search-property-set REPORT -->
- <!-- <feature>add-member</feature> --> <!-- Add-member used to create resources -->
+ <feature>add-member</feature> <!-- Add-member used to create resources -->
<feature>ctag</feature> <!-- ctag extension -->
<feature>current-user-principal</feature> <!-- current-user-principal extension -->
<feature>directory listing</feature> <!-- GET on collection -->
@@ -45,7 +45,7 @@
<feature>expand-property</feature> <!-- Expand property REPORT -->
<feature>quota</feature> <!-- WebDAV QUOTA -->
<feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
- <!-- <feature>well-known</feature> --> <!-- well-known feature -->
+ <feature>well-known</feature> <!-- well-known feature -->
<!-- CalDAV specific extension -->
<feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
@@ -59,13 +59,14 @@
<feature>private-events</feature> <!-- private-events extension -->
<feature>proxy</feature> <!-- calendar-user-proxy extension -->
<feature>proxy-authz</feature> <!-- sudo user extension -->
+ <feature>shared-calendars</feature> <!-- Shared calendars extension -->
<feature>schedule-changes</feature> <!-- schedule-changes property extension -->
- <feature>shared-calendars</feature> <!-- Shared calendars extension -->
<feature>timezone-service</feature> <!-- Timezone service extension -->
<feature>vavailability</feature> <!-- VAVAILABILITY on inbox -->
<!-- CardDAV specific extension -->
- <!-- <feature>carddav</feature> --> <!-- Basic CardDAV feature enabler -->
+ <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>global-addressbook</feature> <!-- Global address book for each user -->
</features>
@@ -227,18 +228,24 @@
<value>$addressbooks:$groupstype:/</value>
</substitution>
- <!-- primary calendar name-->
+ <!-- primary addressbook name -->
<substitution>
<key>$addressbook:</key>
<value>addressbook</value>
</substitution>
- <!-- directory name-->
+ <!-- directory name -->
<substitution>
<key>$directory:</key>
<value>$root:directory/</value>
</substitution>
+ <!-- global-addressbook name -->
+ <substitution>
+ <key>$global_addressbook:</key>
+ <value>global-addressbook</value>
+ </substitution>
+
<!-- user id for admin user -->
<substitution>
<key>$useradmin:</key>
Added: CalDAVTester/trunk/scripts/tests/CardDAV/global-addressbook.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/global-addressbook.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/global-addressbook.xml 2010-04-15 21:07:30 UTC (rev 5484)
@@ -0,0 +1,219 @@
+<?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 global addressbook</description>
+
+ <require-feature>
+ <feature>carddav</feature>
+ <feature>global-addressbook</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='Resourcetype'>
+ <test name='1'>
+ <description>PROPFIND of resourcetype</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome1:/$global_addressbook:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindValues</callback>
+ <arg>
+ <name>props</name>
+ <value>DAV:resourcetype$.*shared[^-].*</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Changes by multiple users'>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/$global_addressbook:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1-1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>initial query - grab token</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome2:/$global_addressbook:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2-1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>new resource</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$global_addressbook:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/2.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>sync change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/$global_addressbook:/</ruri>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1-2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>sync change</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome2:/$global_addressbook:/</ruri>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2-2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>new resource #2</description>
+ <request user="$userid2:" pswd="$pswd2:" end-delete="yes">
+ <method>PUT</method>
+ <ruri>$addressbookhome2:/$global_addressbook:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/5.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>sync change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/$global_addressbook:/</ruri>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1-3:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>sync change</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome2:/$global_addressbook:/</ruri>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/global-addressbook/7.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2-3:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100415/ea93aea6/attachment-0001.html>
More information about the calendarserver-changes
mailing list