diff --git a/test/Resource/CalDAV/scheduleprops/1.xml b/test/Resource/CalDAV/scheduleprops/1.xml new file mode 100644 index 0000000..64d8c08 --- /dev/null +++ b/test/Resource/CalDAV/scheduleprops/1.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/test/runtests.sh b/test/runtests.sh index e9082c2..574335c 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -1,36 +1,37 @@ #!/bin/bash # # Copyright (C) 2013, Kolab Systems AG # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . ## # Initializes the CalDAVTester environment and runs all test scripts # CALDAVTESTER=$1 PYTHONPATH=`$CALDAVTESTER/run.py -p` export PYTHONPATH="$PYTHONPATH:$CALDAVTESTER/../pycalendar/src" $CALDAVTESTER/testcaldav.py --print-details-onfail -s serverinfo.xml \ CardDAV/current-user-principal.xml \ CardDAV/ab-client.xml \ CardDAV/propfind.xml \ CardDAV/put.xml \ CardDAV/directory-gateway.xml \ CalDAV/current-user-principal.xml \ CalDAV/caldavIOP.xml \ CalDAV/ctag.xml \ - CalDAV/attachments.xml + CalDAV/attachments.xml \ + CalDAV/scheduleprops.xml diff --git a/test/scripts/tests/CalDAV/scheduleprops.xml b/test/scripts/tests/CalDAV/scheduleprops.xml new file mode 100644 index 0000000..cc00c37 --- /dev/null +++ b/test/scripts/tests/CalDAV/scheduleprops.xml @@ -0,0 +1,255 @@ + + + + + + + + Test properties defined by caldav-schedule + + + caldav + + + + + + + PROPFIND inbox/outbox URLs + + PROPFIND + $principal1: +
+ Depth + 0 +
+ + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/1.xml + + + propfindItems + + okprops + {urn:ietf:params:xml:ns:caldav}schedule-inbox-URL + {urn:ietf:params:xml:ns:caldav}schedule-outbox-URL + {urn:ietf:params:xml:ns:caldav}calendar-user-address-set + + +
+
+
+ + + + PROPFIND inbox + + PROPFIND + $inboxpath1:/ +
+ Depth + 0 +
+ + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/2.xml + + + propfindItems + + okprops + $calendarpath1:/]]> + + +
+
+ + PROPPATCH valid calendar + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/3.xml + + + propfindItems + + okprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + PROPPATCH invalid calendar + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/4.xml + + + propfindItems + + badprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + PROPPATCH delete it - fails + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/5.xml + + + propfindItems + + badprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + PROPPATCH valid calendar - reset it + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/3.xml + + + propfindItems + + okprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + Setup some calendars + + MKCALENDAR + $calendarhome1:/test1/ + + statusCode + + + + MKCALENDAR + $calendarhome1:/test2/ + + statusCode + + + + + PROPPATCH - valid + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/6.xml + + + propfindItems + + okprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + Delete a calendar + + DELETE + $calendarhome1:/test2/ + + statusCode + + + + + PROPPATCH - valid new calendar, invalid existing + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/7.xml + + + propfindItems + + badprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + PROPPATCH - invalid new calendar, invalid existing + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/8.xml + + + propfindItems + + badprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + + + PROPPATCH valid calendar - reset it + + PROPPATCH + $inboxpath1:/ + + text/xml; charset=utf-8 + Resource/CalDAV/scheduleprops/3.xml + + + propfindItems + + okprops + {urn:ietf:params:xml:ns:caldav}calendar-free-busy-set + + + + +
+ + + +
diff --git a/test/serverinfo.xml b/test/serverinfo.xml index 14df516..4ab96fb 100644 --- a/test/serverinfo.xml +++ b/test/serverinfo.xml @@ -1,815 +1,815 @@ localhost 80 443 basic COPY Method MOVE Method Extended MKCOL ctag current-user-principal well-known caldav - schedule-inbox --> + schedule-inbox carddav directory-gateway $root: /iRony/ $multistatus-response-prefix: /{DAV:}multistatus/{DAV:}response $multistatus-href-prefix: /{DAV:}multistatus/{DAV:}response/{DAV:}href $verify-response-prefix: {DAV:}response/{DAV:}propstat/{DAV:}prop $verify-property-prefix: /{DAV:}multistatus/{DAV:}response/{DAV:}propstat/{DAV:}prop $verify-bad-response: /{DAV:}multistatus/{DAV:}response/{DAV:}status $verify-error-response: /{DAV:}multistatus/{DAV:}response/{DAV:}error $CALDAV: urn:ietf:params:xml:ns:caldav $CARDDAV: urn:ietf:params:xml:ns:carddav $CS: http://calendarserver.org/ns/ $principalcollection: $root:principals/ $uidstype: __uids__ $userstype: users $groupstype: groups $locationstype: locations $resourcestype: resources $principals_uids: $principalcollection:$uidstype:/ $principals_users: $principalcollection:$userstype:/ $principals_groups: $principalcollection:$groupstype:/ $principals_resources: $principalcollection:$resourcestype:/ $principals_locations: $principalcollection:$locationstype:/ $calendars: $root:calendars/ $calendars_uids: $calendars:$uidstype:/ $calendars_users: $calendars:$userstype:/ $calendars_groups: $calendars:$groupstype:/ $calendars_resources: $calendars:$resourcestype:/ $calendars_locations: $calendars:$locationstype:/ $calendar: Calendar $tasks: Tasks $inbox: inbox $outbox: outbox $dropbox: dropbox $attachments: dropbox $notification: notification $freebusy: freebusy $servertoserver: $root:inbox $timezoneservice: $root:timezones $timezonestdservice: $root:stdtimezones $addressbooks: $root:addressbooks/ $addressbooks_uids: $addressbooks:$uidstype:/ $addressbooks_users: $addressbooks:$userstype:/ $addressbooks_groups: $addressbooks:$groupstype:/ $addressbook: Contacts $global_addressbook: global-addressbook $directory: $addressbooks:ldap-directory/ $add-member: ;add-member $useradmin: admin $useradminguid: admin $pswdadmin: admin $principal_admin: $principalcollection:$useradmin:/ $principaluri_admin: $principalcollection:$useradminguid:/ $userapprentice: apprentice $userapprenticeguid: apprentice $pswdapprentice: apprentice $principal_apprentice: $principalcollection:$userapprentice:/ $principaluri_apprentice: $principalcollection:$userapprenticeguid:/ $userproxy: superuser $pswdproxy: superuser $userid%d: dav.user%02d@example.org $userguid%d: $userid%d: $username%d: DAV User%02d $username-encoded%d: DAV%%20User%02d $firstname%d: DAV $lastname%d: User %02d $pswd%d: 12345 $principal%d: $principalcollection:$userid%d:/ $principaluri%d: $principalcollection:dav.user%02d@example.org/ $principal%dnoslash: $principalcollection:$userid%d: $calendarhome%d: $calendars:$userguid%d: $calendarhomealt%d: $calendars:$userid%d: $calendarpath%d: $calendarhome%d:/$calendar: $calendarpathalt%d: $calendarhomealt%d:/$calendar: $taskspath%d: $calendarhome%d:/$tasks: $inboxpath%d: $calendarhome%d:/$inbox: $outboxpath%d: $calendarhome%d:/$outbox: $dropboxpath%d: $calendarhome%d:/$dropbox: $notificationpath%d: $calendarhome%d:/$notification: $freebusypath%d: $calendarhome%d:/$freebusy: $email%d: $userid%d: $cuaddr%d: mailto:$email%d: $cuaddralt%d: $principaluri%d: $cuaddraltnoslash%d: $principals_uids:$userguid%d: $cuaddrurn%d: urn:uuid:$userguid%d: $addressbookhome%d: $addressbooks:$userguid%d: $addressbookpath%d: $addressbooks:$userguid%d:/$addressbook: $directory%d: $addressbooks:$userguid%d:/ldap-directory/ $publicuserid%d: public%02d $publicuserguid%d: public%02d $publicusername%d: Public %02d $publicpswd%d: public%02d $publicprincipal%d: $principals_users:$publicuserid%d:/ $publicprincipaluri%d: $principals_uids:$publicuserguid%d:/ $publiccalendarhome%d: $calendars:$publicuserguid%d: $publiccalendarpath%d: $calendars:$publicuserguid%d:/$calendar: $publicemail%d: $publicuserid%d:@example.com $publiccuaddr%d: mailto:$publicemail%d: $publiccuaddralt%d: $publicprincipaluri%d: $publiccuaddrurn%d: urn:uuid:$publicuserguid%d: $resourceid%d: resource%02d $resourceguid%d: resource%02d $resourcename%d: Resource %02d $rcalendarhome%d: $calendars:$resourceguid%d: $rcalendarpath%d: $calendars:$resourceguid%d:/$calendar: $rinboxpath%d: $calendars:$resourceguid%d:/$inbox: $routboxpath%d: $calendars:$resourceguid%d:/$outbox: $rprincipal%d: $principals_resources:$resourceid%d:/ $rprincipaluri%d: $principals_uids:$resourceguid%d:/ $rcuaddralt%d: $rprincipaluri%d: $rcuaddrurn%d: urn:uuid:$resourceguid%d: $locationid%d: location%02d $locationguid%d: location%02d $locationname%d: Location %02d $lcalendarhome%d: $calendars:$locationguid%d: $lcalendarpath%d: $calendars:$locationguid%d:/$calendar: $linboxpath%d: $calendars:$locationguid%d:/$inbox: $loutboxpath%d: $calendars:$locationguid%d:/$outbox: $lprincipal%d: $principals_resources:$locationid%d:/ $lprincipaluri%d: $principals_uids:$locationguid%d:/ $lcuaddralt%d: $lprincipaluri%d: $lcuaddrurn%d: urn:uuid:$locationguid%d: $groupid%d: group%02d $groupguid%d: group%02d $groupname%d: Group %02d $gprincipal%d: $principals_resources:$groupid%d:/ $gprincipaluri%d: $principals_uids:$groupguid%d:/ $gcuaddralt%d: $gprincipaluri%d: $gcuaddrurn%d: urn:uuid:$groupguid%d: $i18nid: i18nuser $i18nguid: i18nuser $i18nname: まだ $i18npswd: i18nuser $i18ncalendarpath: $calendars:$i18nguid:/$calendar: $i18nemail: $i18nid:@example.com $i18ncuaddr: mailto:$i18nemail: $i18ncuaddrurn: urn:uuid:$i18nguid: $principaldisabled: $principals_groups:disabledgroup/ $principaluridisabled: $principals_uids:disabledgroup/ $cuaddrdisabled: $principals_uids:disabledgroup/ $cuaddr2: MAILTO:$email2: