[CalendarServer-changes] [11601] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Aug 12 20:24:46 PDT 2013
Revision: 11601
http://trac.calendarserver.org//changeset/11601
Author: gaya at apple.com
Date: 2013-08-12 20:24:46 -0700 (Mon, 12 Aug 2013)
Log Message:
-----------
Add shared group PUT tests
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CardDAV/sharing-access.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CardDAV/sharing/put/
CalDAVTester/trunk/Resource/CardDAV/sharing/put/1.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/10.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/11.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/2.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/3.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/4.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/put/5.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/put/6.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/7.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/8.vcf
CalDAVTester/trunk/Resource/CardDAV/sharing/put/9.vcf
CalDAVTester/trunk/scripts/tests/CardDAV/sharing-put.xml
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/1.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/1.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/1.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/10.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/10.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/10.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f23
+FN:Sharee Group
+N:ShareeGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/11.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/11.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/11.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f03
+FN:Shared Group
+N:SharedGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:760d9b28-5a13-4880-b7eb-5769e6688f23
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/2.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/2.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/2.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f03
+FN:Shared Group
+N:SharedGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/3.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/3.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/3.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f13
+FN:Private Group
+N:PrivateGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/4.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/4.xml 2013-08-13 03:24:46 UTC (rev 11601)
@@ -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>$cuaddrurn1:</D:href>
+ <CS:summary>Shared Group</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/5.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/5.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/5.xml 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+ <href xmlns='DAV:'>$cuaddrurn1:</href>
+ <invite-accepted/>
+ <hosturl>
+ <href xmlns='DAV:'>$addressbookpath2:/2.vcf</href>
+ </hosturl>
+ <in-reply-to>$inviteuid:</in-reply-to>
+ <summary>Read-Write Group123</summary>
+ <common-name>$username1:</common-name>
+ <first-name>$firstname1:</first-name>
+ <last-name>$lastname1:</last-name>
+</invite-reply>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/6.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/6.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/6.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f13
+FN:UIDdup Group
+N:UIDdupGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/7.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/7.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/7.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f23
+FN:Sharee Group
+N:ShareeGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:760d9b28-5a13-4880-b7eb-5769e6688f13
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/8.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/8.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/8.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688f23
+FN:Sharee Group
+N:ShareeGroup;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1
+END:VCARD
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/put/9.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/put/9.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/put/9.vcf 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,12 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688fa3
+FN:Group 123
+N:Group123;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E2
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:FCBA0FA3-00B2-4C95-B4EC-4CCC4843F8B1
+END:VCARD
Modified: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-access.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-access.xml 2013-08-12 20:21:18 UTC (rev 11600)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-access.xml 2013-08-13 03:24:46 UTC (rev 11601)
@@ -644,42 +644,6 @@
</request>
</test>
<test name='5' ignore='no'>
- <description>adding vCard with UID in owner's address book fails</description>
- <request>
- <method>PUT</method>
- <ruri>$addressbookhome1:/$userguid2:/9.vcf</ruri>
- <data>
- <content-type>text/vcard; charset=utf-8</content-type>
- <filepath>Resource/CardDAV/sharing/access/setup/4.vcf</filepath>
- </data>
- <verify>
- <callback>prepostcondition</callback>
- <arg>
- <name>error</name>
- <value>{urn:ietf:params:xml:ns:carddav}no-uid-conflict</value>
- </arg>
- </verify>
- </request>
- </test>
- <test name='6' ignore='no'>
- <description>adding vCard with name in owner's address book fails</description>
- <request>
- <method>PUT</method>
- <ruri>$addressbookhome1:/$userguid2:/5.vcf</ruri>
- <data>
- <content-type>text/vcard; charset=utf-8</content-type>
- <filepath>Resource/CardDAV/sharing/access/setup/6.vcf</filepath>
- </data>
- <verify>
- <callback>statusCode</callback>
- <arg>
- <name>status</name>
- <value>403</value>
- </arg>
- </verify>
- </request>
- </test>
- <test name='7' ignore='no'>
<description>vCard with new UID shared read-write group can be added</description>
<request>
<method>PUT</method>
@@ -693,7 +657,7 @@
</verify>
</request>
</test>
- <test name='8' ignore='no'>
+ <test name='6' ignore='no'>
<description>New vCard is member of shared group</description>
<request>
<method>GET</method>
Added: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-put.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-put.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-put.xml 2013-08-13 03:24:46 UTC (rev 11601)
@@ -0,0 +1,269 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2013 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 sharing address books</description>
+
+ <require-feature>
+ <feature>carddav</feature>
+ <feature>shared-addressbooks</feature>
+ </require-feature>
+
+ <start>
+ <description>clean up old data</description>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <ruri>$addressbookhome2:/</ruri>
+ <ruri>$notificationpath1:/</ruri>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+
+ <description>add 1 person in two groups to user2 address book</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookpath2:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/1.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookpath2:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/2.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookpath2:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/3.vcf</filepath>
+ </data>
+ </request>
+ <description>user2 POSTs invitation</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath2:/2.vcf</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes notification</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ </start>
+
+
+ <test-suite name='add users to sharee address book' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>cannot add vcard with UID in sharer address book</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userguid2:/11.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/6.vcf</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{urn:ietf:params:xml:ns:carddav}no-uid-conflict</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>cannot add group with member in sharer address book</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userguid2:/11.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/7.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>cannot add vCard with name in sharer address book</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userguid2:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/8.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>can add group with member in shared group</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userguid2:/11.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/put/8.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>can delete user</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userguid2:/1.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>user is removed from sharee group</description>
+ <request>
+ <method>GET</method>
+ <ruri>$addressbookhome1:/$userguid2:/1.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>404</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>user is deleted from sharer address book</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$addressbookpath2:/1.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>404</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>member is removed from sharee group</description>
+ <request>
+ <method>GET</method>
+ <ruri>$addressbookhome1:/$userguid2:/11.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/put/10.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>member is removed from shared group</description>
+ <request>
+ <method>GET</method>
+ <ruri>$addressbookhome1:/$userguid2:/2.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/put/11.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <description>member is NOT removed from 2nd sharer group</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$addressbookpath2:/3.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/put/3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <ruri>$addressbookpath2:/</ruri>
+ <ruri>$notificationpath1:/</ruri>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ </end>
+
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130812/0a116e67/attachment-0001.html>
More information about the calendarserver-changes
mailing list