From 3c34b8577c7f773bd697512b734062913940a3fd Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 15 Dec 2016 00:40:12 +0100 Subject: [PATCH] Add test execution against legacy DAV backend Since the tests to quite hugely rely on sync tokens being present I also included those in the legacy backend. Signed-off-by: Roeland Jago Douma --- .drone.yml | 36 +- apps/dav/appinfo/v1/caldav.php | 1 + apps/dav/appinfo/v1/carddav.php | 1 + apps/dav/lib/CalDAV/CalDavBackend.php | 2 +- .../{script.sh => script-new-endpoint.sh} | 3 + .../travis/caldav/script-old-endpoint.sh | 23 + ...erinfo.xml => serverinfo-new-endpoint.xml} | 0 .../serverinfo-old-caldav-endpoint.xml | 850 ++++++++++++++++++ .../serverinfo-old-carddav-endpoint.xml | 850 ++++++++++++++++++ .../travis/carddav/script-new-endpoint.sh | 25 + .../travis/carddav/script-old-endpoint.sh | 22 + 11 files changed, 1804 insertions(+), 9 deletions(-) rename apps/dav/tests/travis/caldav/{script.sh => script-new-endpoint.sh} (77%) create mode 100644 apps/dav/tests/travis/caldav/script-old-endpoint.sh rename apps/dav/tests/travis/caldavtest/{serverinfo.xml => serverinfo-new-endpoint.xml} (100%) create mode 100644 apps/dav/tests/travis/caldavtest/serverinfo-old-caldav-endpoint.xml create mode 100644 apps/dav/tests/travis/caldavtest/serverinfo-old-carddav-endpoint.xml create mode 100644 apps/dav/tests/travis/carddav/script-new-endpoint.sh create mode 100644 apps/dav/tests/travis/carddav/script-old-endpoint.sh diff --git a/.drone.yml b/.drone.yml index 0fec56bd8e..1e35b2a2fe 100644 --- a/.drone.yml +++ b/.drone.yml @@ -86,24 +86,42 @@ pipeline: when: matrix: TESTS: litmus-v2 - caldavtester: + caldavtester-new-endpoint: image: nextcloudci/litmus-php7.0:litmus-php7.0-4 commands: - bash tests/travis/install.sh sqlite - bash apps/dav/tests/travis/caldav/install.sh - - bash apps/dav/tests/travis/caldav/script.sh + - bash apps/dav/tests/travis/caldav/script-new-endpoint.sh when: matrix: - TESTS: caldavtester - carddavtester: + TESTS: caldavtester-new-endpoint + caldavtester-old-endpoint: + image: nextcloudci/litmus-php7.0:litmus-php7.0-4 + commands: + - bash tests/travis/install.sh sqlite + - bash apps/dav/tests/travis/caldav/install.sh + - bash apps/dav/tests/travis/caldav/script-old-endpoint.sh + when: + matrix: + TESTS: caldavtester-old-endpoint + carddavtester-new-endpoint: image: nextcloudci/litmus-php7.0:litmus-php7.0-4 commands: - bash tests/travis/install.sh sqlite - bash apps/dav/tests/travis/carddav/install.sh - - bash apps/dav/tests/travis/carddav/script.sh + - bash apps/dav/tests/travis/carddav/script-new-endpoint.sh when: matrix: - TESTS: carddavtester + TESTS: carddavtester-new-endpoint + carddavtester-old-endpoint: + image: nextcloudci/litmus-php7.0:litmus-php7.0-4 + commands: + - bash tests/travis/install.sh sqlite + - bash apps/dav/tests/travis/carddav/install.sh + - bash apps/dav/tests/travis/carddav/script-old-endpoint.sh + when: + matrix: + TESTS: carddavtester-old-endpoint sqlite-php7.0-samba-native: image: nextcloudci/samba-native-php7.0:samba-native-php7.0-1 commands: @@ -470,8 +488,10 @@ matrix: - TESTS: syntax-php7.1 - TESTS: litmus-v1 - TESTS: litmus-v2 - - TESTS: caldavtester - - TESTS: carddavtester + - TESTS: caldavtester-old-endpoint + - TESTS: caldavtester-new-endpoint + - TESTS: carddavtester-new-endpoint + - TESTS: carddavtester-old-endpoint - TESTS: object-store OBJECT_STORE: s3 - TESTS: sqlite-php7.0-samba-native diff --git a/apps/dav/appinfo/v1/caldav.php b/apps/dav/appinfo/v1/caldav.php index 9f12a92f4c..2708f6f39a 100644 --- a/apps/dav/appinfo/v1/caldav.php +++ b/apps/dav/appinfo/v1/caldav.php @@ -80,6 +80,7 @@ if ($debugging) { $server->addPlugin(new Sabre\DAV\Browser\Plugin()); } +$server->addPlugin(new \Sabre\DAV\Sync\Plugin()); $server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin()); $server->addPlugin(new \Sabre\CalDAV\Schedule\Plugin()); $server->addPlugin(new \OCA\DAV\CalDAV\Schedule\IMipPlugin( \OC::$server->getMailer(), \OC::$server->getLogger())); diff --git a/apps/dav/appinfo/v1/carddav.php b/apps/dav/appinfo/v1/carddav.php index e379707807..b70045d420 100644 --- a/apps/dav/appinfo/v1/carddav.php +++ b/apps/dav/appinfo/v1/carddav.php @@ -78,6 +78,7 @@ if ($debugging) { $server->addPlugin(new Sabre\DAV\Browser\Plugin()); } +$server->addPlugin(new \Sabre\DAV\Sync\Plugin()); $server->addPlugin(new \Sabre\CardDAV\VCFExportPlugin()); $server->addPlugin(new \OCA\DAV\CardDAV\ImageExportPlugin(\OC::$server->getLogger())); $server->addPlugin(new ExceptionLoggerPlugin('carddav', \OC::$server->getLogger())); diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index d77c761a2c..7a51674d32 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -581,7 +581,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription */ function createCalendar($principalUri, $calendarUri, array $properties) { $values = [ - 'principaluri' => $principalUri, + 'principaluri' => $this->convertPrincipal($principalUri, true), 'uri' => $calendarUri, 'synctoken' => 1, 'transparent' => 0, diff --git a/apps/dav/tests/travis/caldav/script.sh b/apps/dav/tests/travis/caldav/script-new-endpoint.sh similarity index 77% rename from apps/dav/tests/travis/caldav/script.sh rename to apps/dav/tests/travis/caldav/script-new-endpoint.sh index 636235349c..c9bb7307c7 100644 --- a/apps/dav/tests/travis/caldav/script.sh +++ b/apps/dav/tests/travis/caldav/script-new-endpoint.sh @@ -2,6 +2,9 @@ SCRIPT=`realpath $0` SCRIPTPATH=`dirname $SCRIPT` +# Move the endpoint to the serverinfo file +cp "$SCRIPTPATH/../caldavtest/serverinfo-new-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml" + # start the server php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." & diff --git a/apps/dav/tests/travis/caldav/script-old-endpoint.sh b/apps/dav/tests/travis/caldav/script-old-endpoint.sh new file mode 100644 index 0000000000..6e08f27310 --- /dev/null +++ b/apps/dav/tests/travis/caldav/script-old-endpoint.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +SCRIPT=`realpath $0` +SCRIPTPATH=`dirname $SCRIPT` + +# Move the endpoint to the serverinfo file +cp "$SCRIPTPATH/../caldavtest/serverinfo-old-caldav-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml" + +# start the server +php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." & + +sleep 30 + +# run the tests +cd "$SCRIPTPATH/CalDAVTester" +PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \ + "CalDAV/current-user-principal.xml" \ + "CalDAV/sync-report.xml" + +RESULT=$? + +tail "$/../../../../../data-autotest/nextcloud.log" + +exit $RESULT diff --git a/apps/dav/tests/travis/caldavtest/serverinfo.xml b/apps/dav/tests/travis/caldavtest/serverinfo-new-endpoint.xml similarity index 100% rename from apps/dav/tests/travis/caldavtest/serverinfo.xml rename to apps/dav/tests/travis/caldavtest/serverinfo-new-endpoint.xml diff --git a/apps/dav/tests/travis/caldavtest/serverinfo-old-caldav-endpoint.xml b/apps/dav/tests/travis/caldavtest/serverinfo-old-caldav-endpoint.xml new file mode 100644 index 0000000000..8ac822d8e4 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/serverinfo-old-caldav-endpoint.xml @@ -0,0 +1,850 @@ + + + + + + + + localhost + 8888 + basic + + + 120 + 0.25 + 30 + + + + COPY Method + MOVE Method + Extended MKCOL + + + ACL Method + acl-principal-prop-set REPORT + principal-match REPORT + principal-property-search REPORT + principal-search-property-set REPORT + calendarserver-principal-search REPORT + + add-member + + brief + bulk-post + ctag + current-user-principal + directory listing + extended-principal-search + expand-property + only-proxy-groups + limits + own-root + prefer + prefer-minimal + prefer-representation + prefer-noroot + quota + + resource-id + sync-report + + + sync-report-config-token + well-known + + + + + json-data + + + control-api + + + caldav + attachments-collection + auto-accept + auto-accept-modes + client-fix-TRANSP + + default-alarms + EMAIL parameter + extended-freebusy + freebusy-url + group-attendee-expansion + implicit-scheduling + location-resource-tracking + managed-attachments + maskuid + no-duplicate-uids + partstat-timestamp + + private-comments + private-events + proxy + + recurrence-splitting + remove-duplicate-alarms + query-extended + shared-calendars + share-calendars-to-groups + schedule-changes + split-calendars + supported-component-sets + supported-component-sets-one + timerange-low-limit + timerange-high-limit + timezones-by-reference + timezone-service + timezone-std-service + + travel-time-busy + vavailability + + webcal + + + carddav + default-addressbook + shared-addressbooks + shared-addressbook-groups + directory-gateway + + + + + + + $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/ + + + + + + + + $root: + /remote.php/caldav/ + + + + + $principalcollection: + $root:principals/ + + + + + $uidstype: + __uids__ + + + $groupstype: + groups + + + $locationstype: + locations + + + $resourcestype: + resources + + + + + $principals_uids: + $principalcollection:$uidstype:/ + + + $principals_users: + $principalcollection: + + + $principals_groups: + $principalcollection:$groupstype:/ + + + $principals_resources: + $principalcollection:$resourcestype:/ + + + $principals_locations: + $principalcollection:$locationstype:/ + + + + + $calendars: + $root:calendars/ + + + + + $calendars_uids: + $calendars:$uidstype:/ + + + $calendars_users: + $calendars:/ + + + $calendars_resources: + $calendars:$resourcestype:/ + + + $calendars_locations: + $calendars:$locationstype:/ + + + + + $calendar: + calendar + + + + + $tasks: + tasks + + + + + $polls: + polls + + + + + $inbox: + inbox + + + + + $outbox: + outbox + + + + + $dropbox: + dropbox + + + + + $attachments: + dropbox + + + + + $notification: + notification + + + + + $freebusy: + freebusy + + + + + $calendar_home_items_initial_sync: + [-,$calendar:/,$tasks:/,$inbox:/,$outbox:/,$freebusy:,$notification:/] + + + + + $calendar_sync_extra_items: + [-] + + + + + $calendar_sync_extra_count: + 1 + + + + + $servertoserver: + $root:inbox + + + + + $timezoneservice: + $root:timezones + + + + + $timezonestdservice: + $root:stdtimezones + + + + + $addressbooks: + $root:addressbooks/ + + + + + $addressbooks_uids: + $addressbooks:$uidstype:/ + + + $addressbooks_users: + $addressbooks:/ + + + + + $addressbook: + addressbook + + + + + $directory: + $root:directory/ + + + + + $add-member: + ;add-member + + + + + $useradmin: + admin + + + + $useradminguid: + 0C8BDE62-E600-4696-83D3-8B5ECABDFD2E + + + + $pswdadmin: + admin + + + + + $principal_admin: + $principals_users:$useradmin:/ + + + $principaluri_admin: + $principals_uids:$useradminguid:/ + + + + + $userapprentice: + apprentice + + + + $userapprenticeguid: + 29B6C503-11DF-43EC-8CCA-40C7003149CE + + + + $pswdapprentice: + apprentice + + + + + $principal_apprentice: + $principals_users:$userapprentice:/ + + + $principaluri_apprentice: + $principals_uids:$userapprenticeguid:/ + + + + + $userproxy: + superuser + + + + $pswdproxy: + superuser + + + + + + + $userid%d: + user%02d + + + + $userguid%d: + 10000000-0000-0000-0000-000000000%03d + + + + $username%d: + User %02d + + + + $username-encoded%d: + User%%20%02d + + + + $firstname%d: + User + + + + $lastname%d: + %02d + + + + $pswd%d: + user%02d + + + + $principal%d: + $principals_users:$userid%d:/ + + + $principaluri%d: + $principals_users:$userid%d:/ + + + $principal%dnoslash: + $principals_users:$userid%d: + + + + + $calendarhome%d: + $calendars:$userid%d: + + + + $calendarhomealt%d: + $calendars_users:$userid%d: + + + + $calendarpath%d: + $calendarhome%d:/$calendar: + + + + $calendarpathalt%d: + $calendarhomealt%d:/$calendar: + + + + $taskspath%d: + $calendarhome%d:/$tasks: + + + + $pollspath%d: + $calendarhome%d:/$polls: + + + + $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:@example.com + + + + $cuaddr%d: + mailto:$email%d: + + + $cuaddralt%d: + $cuaddr%d: + + + $cuaddraltnoslash%d: + $cuaddr%d: + + + $cuaddrurn%d: + urn:x-uid:$userguid%d: + + + + + $addressbookhome%d: + $addressbooks:users/$userid%d: + + + + $addressbookpath%d: + $addressbookhome%d:/$addressbook: + + + + + + + + $publicuserid%d: + public%02d + + + + $publicuserguid%d: + 50000000-0000-0000-0000-0000000000%02d + + + + $publicusername%d: + Public %02d + + + + $publicpswd%d: + public%02d + + + + $publicprincipal%d: + $principals_users:$publicuserid%d:/ + + + $publicprincipaluri%d: + $principals_uids:$publicuserguid%d:/ + + + + $publiccalendarhome%d: + $calendars_uids:$publicuserguid%d: + + + + $publiccalendarpath%d: + $calendars_uids:$publicuserguid%d:/$calendar: + + + $publicemail%d: + $publicuserid%d:@example.com + + + + $publiccuaddr%d: + mailto:$publicemail%d: + + + $publiccuaddralt%d: + $publiccuaddr%d: + + + $publiccuaddrurn%d: + urn:x-uid:$publicuserguid%d: + + + + + + + $resourceid%d: + resource%02d + + + + $resourceguid%d: + 40000000-0000-0000-0000-000000000%03d + + + + $resourcename%d: + Resource %02d + + + + $rcalendarhome%d: + $calendars_uids:$resourceguid%d: + + + + $rcalendarpath%d: + $calendars_uids:$resourceguid%d:/$calendar: + + + + $rinboxpath%d: + $calendars_uids:$resourceguid%d:/$inbox: + + + + $routboxpath%d: + $calendars_uids:$resourceguid%d:/$outbox: + + + + $rprincipal%d: + $principals_resources:$resourceid%d:/ + + + $rprincipaluri%d: + $principals_uids:$resourceguid%d:/ + + + $rcuaddralt%d: + $rcuaddrurn%d: + + + $rcuaddrurn%d: + urn:x-uid:$resourceguid%d: + + + + + + + $locationid%d: + location%02d + + + + $locationguid%d: + 30000000-0000-0000-0000-000000000%03d + + + + $locationname%d: + Location %02d + + + + $lcalendarhome%d: + $calendars_uids:$locationguid%d: + + + + $lcalendarpath%d: + $calendars_uids:$locationguid%d:/$calendar: + + + + $linboxpath%d: + $calendars_uids:$locationguid%d:/$inbox: + + + + $loutboxpath%d: + $calendars_uids:$locationguid%d:/$outbox: + + + + $lprincipal%d: + $principals_resources:$locationid%d:/ + + + $lprincipaluri%d: + $principals_uids:$locationguid%d:/ + + + $lcuaddralt%d: + $lprincipaluri%d: + + + $lcuaddrurn%d: + urn:x-uid:$locationguid%d: + + + + + + + + $groupid%d: + group%02d + + + + $groupguid%d: + 20000000-0000-0000-0000-000000000%03d + + + + $groupname%d: + Group %02d + + + + $gprincipal%d: + $principals_resources:$groupid%d:/ + + + $gprincipaluri%d: + $principals_uids:$groupguid%d:/ + + + $gemail%d: + $groupid%d:@example.com + + + $gcuaddralt%d: + $gprincipaluri%d: + + + $gcuaddrurn%d: + urn:x-uid:$groupguid%d: + + + + + + $i18nid: + i18nuser + + + + $i18nguid: + 860B3EE9-6D7C-4296-9639-E6B998074A78 + + + + $i18nname: + まだ + + + + $i18npswd: + i18nuser + + + + $i18ncalendarpath: + $calendars_uids:$i18nguid:/$calendar: + + + $i18nemail: + $i18nid:@example.com + + + + $i18ncuaddr: + mailto:$i18nemail: + + + $i18ncuaddrurn: + urn:x-uid:$i18nguid: + + + + + $principaldisabled: + $principals_groups:disabledgroup/ + + + $principaluridisabled: + $principals_uids:disabledgroup/ + + + + $cuaddrdisabled: + $principals_uids:disabledgroup/ + + + + + + + $cuaddr2: + MAILTO:$email2: + + + + diff --git a/apps/dav/tests/travis/caldavtest/serverinfo-old-carddav-endpoint.xml b/apps/dav/tests/travis/caldavtest/serverinfo-old-carddav-endpoint.xml new file mode 100644 index 0000000000..bd9f83a481 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/serverinfo-old-carddav-endpoint.xml @@ -0,0 +1,850 @@ + + + + + + + + localhost + 8888 + basic + + + 120 + 0.25 + 30 + + + + COPY Method + MOVE Method + Extended MKCOL + + + ACL Method + acl-principal-prop-set REPORT + principal-match REPORT + principal-property-search REPORT + principal-search-property-set REPORT + calendarserver-principal-search REPORT + + add-member + + brief + bulk-post + ctag + current-user-principal + directory listing + extended-principal-search + expand-property + only-proxy-groups + limits + own-root + prefer + prefer-minimal + prefer-representation + prefer-noroot + quota + + resource-id + sync-report + + + sync-report-config-token + well-known + + + + + json-data + + + control-api + + + caldav + attachments-collection + auto-accept + auto-accept-modes + client-fix-TRANSP + + default-alarms + EMAIL parameter + extended-freebusy + freebusy-url + group-attendee-expansion + implicit-scheduling + location-resource-tracking + managed-attachments + maskuid + no-duplicate-uids + partstat-timestamp + + private-comments + private-events + proxy + + recurrence-splitting + remove-duplicate-alarms + query-extended + shared-calendars + share-calendars-to-groups + schedule-changes + split-calendars + supported-component-sets + supported-component-sets-one + timerange-low-limit + timerange-high-limit + timezones-by-reference + timezone-service + timezone-std-service + + travel-time-busy + vavailability + + webcal + + + carddav + default-addressbook + shared-addressbooks + shared-addressbook-groups + directory-gateway + + + + + + + $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/ + + + + + + + + $root: + /remote.php/carddav/ + + + + + $principalcollection: + $root:principals/ + + + + + $uidstype: + __uids__ + + + $groupstype: + groups + + + $locationstype: + locations + + + $resourcestype: + resources + + + + + $principals_uids: + $principalcollection:$uidstype:/ + + + $principals_users: + $principalcollection: + + + $principals_groups: + $principalcollection:$groupstype:/ + + + $principals_resources: + $principalcollection:$resourcestype:/ + + + $principals_locations: + $principalcollection:$locationstype:/ + + + + + $calendars: + $root:calendars/ + + + + + $calendars_uids: + $calendars:$uidstype:/ + + + $calendars_users: + $calendars:/ + + + $calendars_resources: + $calendars:$resourcestype:/ + + + $calendars_locations: + $calendars:$locationstype:/ + + + + + $calendar: + calendar + + + + + $tasks: + tasks + + + + + $polls: + polls + + + + + $inbox: + inbox + + + + + $outbox: + outbox + + + + + $dropbox: + dropbox + + + + + $attachments: + dropbox + + + + + $notification: + notification + + + + + $freebusy: + freebusy + + + + + $calendar_home_items_initial_sync: + [-,$calendar:/,$tasks:/,$inbox:/,$outbox:/,$freebusy:,$notification:/] + + + + + $calendar_sync_extra_items: + [-] + + + + + $calendar_sync_extra_count: + 1 + + + + + $servertoserver: + $root:inbox + + + + + $timezoneservice: + $root:timezones + + + + + $timezonestdservice: + $root:stdtimezones + + + + + $addressbooks: + $root:addressbooks/ + + + + + $addressbooks_uids: + $addressbooks:$uidstype:/ + + + $addressbooks_users: + $addressbooks:/ + + + + + $addressbook: + addressbook + + + + + $directory: + $root:directory/ + + + + + $add-member: + ;add-member + + + + + $useradmin: + admin + + + + $useradminguid: + 0C8BDE62-E600-4696-83D3-8B5ECABDFD2E + + + + $pswdadmin: + admin + + + + + $principal_admin: + $principals_users:$useradmin:/ + + + $principaluri_admin: + $principals_uids:$useradminguid:/ + + + + + $userapprentice: + apprentice + + + + $userapprenticeguid: + 29B6C503-11DF-43EC-8CCA-40C7003149CE + + + + $pswdapprentice: + apprentice + + + + + $principal_apprentice: + $principals_users:$userapprentice:/ + + + $principaluri_apprentice: + $principals_uids:$userapprenticeguid:/ + + + + + $userproxy: + superuser + + + + $pswdproxy: + superuser + + + + + + + $userid%d: + user%02d + + + + $userguid%d: + 10000000-0000-0000-0000-000000000%03d + + + + $username%d: + User %02d + + + + $username-encoded%d: + User%%20%02d + + + + $firstname%d: + User + + + + $lastname%d: + %02d + + + + $pswd%d: + user%02d + + + + $principal%d: + $principals_users:$userid%d:/ + + + $principaluri%d: + $principals_users:$userid%d:/ + + + $principal%dnoslash: + $principals_users:$userid%d: + + + + + $calendarhome%d: + $calendars:$userid%d: + + + + $calendarhomealt%d: + $calendars_users:$userid%d: + + + + $calendarpath%d: + $calendarhome%d:/$calendar: + + + + $calendarpathalt%d: + $calendarhomealt%d:/$calendar: + + + + $taskspath%d: + $calendarhome%d:/$tasks: + + + + $pollspath%d: + $calendarhome%d:/$polls: + + + + $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:@example.com + + + + $cuaddr%d: + mailto:$email%d: + + + $cuaddralt%d: + $cuaddr%d: + + + $cuaddraltnoslash%d: + $cuaddr%d: + + + $cuaddrurn%d: + urn:x-uid:$userguid%d: + + + + + $addressbookhome%d: + $addressbooks:$userid%d: + + + + $addressbookpath%d: + $addressbookhome%d:/$addressbook: + + + + + + + + $publicuserid%d: + public%02d + + + + $publicuserguid%d: + 50000000-0000-0000-0000-0000000000%02d + + + + $publicusername%d: + Public %02d + + + + $publicpswd%d: + public%02d + + + + $publicprincipal%d: + $principals_users:$publicuserid%d:/ + + + $publicprincipaluri%d: + $principals_uids:$publicuserguid%d:/ + + + + $publiccalendarhome%d: + $calendars_uids:$publicuserguid%d: + + + + $publiccalendarpath%d: + $calendars_uids:$publicuserguid%d:/$calendar: + + + $publicemail%d: + $publicuserid%d:@example.com + + + + $publiccuaddr%d: + mailto:$publicemail%d: + + + $publiccuaddralt%d: + $publiccuaddr%d: + + + $publiccuaddrurn%d: + urn:x-uid:$publicuserguid%d: + + + + + + + $resourceid%d: + resource%02d + + + + $resourceguid%d: + 40000000-0000-0000-0000-000000000%03d + + + + $resourcename%d: + Resource %02d + + + + $rcalendarhome%d: + $calendars_uids:$resourceguid%d: + + + + $rcalendarpath%d: + $calendars_uids:$resourceguid%d:/$calendar: + + + + $rinboxpath%d: + $calendars_uids:$resourceguid%d:/$inbox: + + + + $routboxpath%d: + $calendars_uids:$resourceguid%d:/$outbox: + + + + $rprincipal%d: + $principals_resources:$resourceid%d:/ + + + $rprincipaluri%d: + $principals_uids:$resourceguid%d:/ + + + $rcuaddralt%d: + $rcuaddrurn%d: + + + $rcuaddrurn%d: + urn:x-uid:$resourceguid%d: + + + + + + + $locationid%d: + location%02d + + + + $locationguid%d: + 30000000-0000-0000-0000-000000000%03d + + + + $locationname%d: + Location %02d + + + + $lcalendarhome%d: + $calendars_uids:$locationguid%d: + + + + $lcalendarpath%d: + $calendars_uids:$locationguid%d:/$calendar: + + + + $linboxpath%d: + $calendars_uids:$locationguid%d:/$inbox: + + + + $loutboxpath%d: + $calendars_uids:$locationguid%d:/$outbox: + + + + $lprincipal%d: + $principals_resources:$locationid%d:/ + + + $lprincipaluri%d: + $principals_uids:$locationguid%d:/ + + + $lcuaddralt%d: + $lprincipaluri%d: + + + $lcuaddrurn%d: + urn:x-uid:$locationguid%d: + + + + + + + + $groupid%d: + group%02d + + + + $groupguid%d: + 20000000-0000-0000-0000-000000000%03d + + + + $groupname%d: + Group %02d + + + + $gprincipal%d: + $principals_resources:$groupid%d:/ + + + $gprincipaluri%d: + $principals_uids:$groupguid%d:/ + + + $gemail%d: + $groupid%d:@example.com + + + $gcuaddralt%d: + $gprincipaluri%d: + + + $gcuaddrurn%d: + urn:x-uid:$groupguid%d: + + + + + + $i18nid: + i18nuser + + + + $i18nguid: + 860B3EE9-6D7C-4296-9639-E6B998074A78 + + + + $i18nname: + まだ + + + + $i18npswd: + i18nuser + + + + $i18ncalendarpath: + $calendars_uids:$i18nguid:/$calendar: + + + $i18nemail: + $i18nid:@example.com + + + + $i18ncuaddr: + mailto:$i18nemail: + + + $i18ncuaddrurn: + urn:x-uid:$i18nguid: + + + + + $principaldisabled: + $principals_groups:disabledgroup/ + + + $principaluridisabled: + $principals_uids:disabledgroup/ + + + + $cuaddrdisabled: + $principals_uids:disabledgroup/ + + + + + + + $cuaddr2: + MAILTO:$email2: + + + + diff --git a/apps/dav/tests/travis/carddav/script-new-endpoint.sh b/apps/dav/tests/travis/carddav/script-new-endpoint.sh new file mode 100644 index 0000000000..9140c37b45 --- /dev/null +++ b/apps/dav/tests/travis/carddav/script-new-endpoint.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +SCRIPT=`realpath $0` +SCRIPTPATH=`dirname $SCRIPT` + +# Move the endpoint to the serverinfo file +cp "$SCRIPTPATH/../caldavtest/serverinfo-new-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml" + +# start the server +php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." & + +sleep 30 + +# run the tests +cd "$SCRIPTPATH/CalDAVTester" +PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \ + "CardDAV/current-user-principal.xml" \ + "CardDAV/sync-report.xml" \ + "CardDAV/sharing-addressbooks.xml" + + +RESULT=$? + +tail "$/../../../../../data-autotest/nextcloud.log" + +exit $RESULT diff --git a/apps/dav/tests/travis/carddav/script-old-endpoint.sh b/apps/dav/tests/travis/carddav/script-old-endpoint.sh new file mode 100644 index 0000000000..216f2f5af3 --- /dev/null +++ b/apps/dav/tests/travis/carddav/script-old-endpoint.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +SCRIPT=`realpath $0` +SCRIPTPATH=`dirname $SCRIPT` + +# Move the endpoint to the serverinfo file +cp "$SCRIPTPATH/../caldavtest/serverinfo-old-carddav-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml" + +# start the server +php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." & + + +# run the tests +cd "$SCRIPTPATH/CalDAVTester" +PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \ + "CardDAV/current-user-principal.xml" \ + "CardDAV/sync-report.xml" + +RESULT=$? + +tail "$/../../../../../data-autotest/nextcloud.log" + +exit $RESULT