Merge pull request #21287 from owncloud/travis-dav-caldavtester
Adding integration tests for CalDAV
This commit is contained in:
commit
d17c2fb8d9
7 changed files with 3704 additions and 5 deletions
|
@ -39,10 +39,8 @@ matrix:
|
|||
- php: 5.4
|
||||
env: DB=pgsql;TC=litmus-v1
|
||||
- php: 5.4
|
||||
env: DB=sqlite;TC=carddavtester
|
||||
# - php: 5.4
|
||||
# env: DB=pgsql;TC=carddavtester
|
||||
# - php: 5.4
|
||||
# env: DB=mysql;TC=caldavtester
|
||||
env: DB=sqlite;TC=carddav
|
||||
- php: 5.4
|
||||
env: DB=sqlite;TC=caldav
|
||||
|
||||
fast_finish: true
|
||||
|
|
20
apps/dav/tests/travis/caldav/install.sh
Normal file
20
apps/dav/tests/travis/caldav/install.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
SCRIPT=`realpath $0`
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
|
||||
|
||||
if [ ! -f CalDAVTester/run.py ]; then
|
||||
cd "$SCRIPTPATH"
|
||||
git clone https://github.com/DeepDiver1975/CalDAVTester.git
|
||||
cd "$SCRIPTPATH/CalDAVTester"
|
||||
python run.py -s
|
||||
cd "$SCRIPTPATH"
|
||||
fi
|
||||
|
||||
# create test user
|
||||
cd "$SCRIPTPATH/../../../../../"
|
||||
OC_PASS=user01 php occ user:add --password-from-env user01
|
||||
php occ dav:create-calendar user01 calendar
|
||||
OC_PASS=user02 php occ user:add --password-from-env user02
|
||||
php occ dav:create-calendar user02 calendar
|
||||
cd "$SCRIPTPATH/../../../../../"
|
18
apps/dav/tests/travis/caldav/script.sh
Normal file
18
apps/dav/tests/travis/caldav/script.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
SCRIPT=`realpath $0`
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
|
||||
# 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 -s "$SCRIPTPATH/../caldavtest/config/serverinfo.xml" -o cdt.txt \
|
||||
"$SCRIPTPATH/../caldavtest/tests/CalDAV/current-user-principal.xml"
|
||||
RESULT=$?
|
||||
|
||||
tail "$/../../../../../data-autotest/owncloud.log"
|
||||
|
||||
exit $RESULT
|
|
@ -0,0 +1,151 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
|
||||
<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
|
||||
|
||||
<!--
|
||||
Copyright (c) 2006-2015 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 DAV:current-user-principal support</description>
|
||||
|
||||
<require-feature>
|
||||
<feature>caldav</feature>
|
||||
<feature>current-user-principal</feature>
|
||||
</require-feature>
|
||||
|
||||
<start/>
|
||||
|
||||
<test-suite name='Check for the property on /'>
|
||||
<require-feature>
|
||||
<feature>own-root</feature>
|
||||
</require-feature>
|
||||
<test name='1'>
|
||||
<description>Check for authenticated property on /</description>
|
||||
<request>
|
||||
<method>PROPFIND</method>
|
||||
<ruri>$root:</ruri>
|
||||
<header>
|
||||
<name>Depth</name>
|
||||
<value>0</value>
|
||||
</header>
|
||||
<data>
|
||||
<content-type>text/xml; charset=utf-8</content-type>
|
||||
<filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
|
||||
</data>
|
||||
<verify>
|
||||
<callback>propfindItems</callback>
|
||||
<arg>
|
||||
<name>okprops</name>
|
||||
<value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri1:</href>]]></value>
|
||||
</arg>
|
||||
</verify>
|
||||
</request>
|
||||
</test>
|
||||
<test name='3'>
|
||||
<description>Check for authenticated property on / (user02)</description>
|
||||
<request user="$userid2:" pswd="$pswd2:">
|
||||
<method>PROPFIND</method>
|
||||
<ruri>$root:</ruri>
|
||||
<header>
|
||||
<name>Depth</name>
|
||||
<value>0</value>
|
||||
</header>
|
||||
<data>
|
||||
<content-type>text/xml; charset=utf-8</content-type>
|
||||
<filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
|
||||
</data>
|
||||
<verify>
|
||||
<callback>propfindItems</callback>
|
||||
<arg>
|
||||
<name>okprops</name>
|
||||
<value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri2:</href>]]></value>
|
||||
</arg>
|
||||
</verify>
|
||||
</request>
|
||||
</test>
|
||||
</test-suite>
|
||||
|
||||
<test-suite name='Check for the property on /principals/'>
|
||||
<test name='1'>
|
||||
<description>Check for authenticated property on /</description>
|
||||
<request>
|
||||
<method>PROPFIND</method>
|
||||
<ruri>$principalcollection:</ruri>
|
||||
<header>
|
||||
<name>Depth</name>
|
||||
<value>0</value>
|
||||
</header>
|
||||
<data>
|
||||
<content-type>text/xml; charset=utf-8</content-type>
|
||||
<filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
|
||||
</data>
|
||||
<verify>
|
||||
<callback>propfindItems</callback>
|
||||
<arg>
|
||||
<name>okprops</name>
|
||||
<value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri1:</href>]]></value>
|
||||
</arg>
|
||||
</verify>
|
||||
</request>
|
||||
</test>
|
||||
<test name='2'>
|
||||
<description>Check for unauthenticated property on /</description>
|
||||
<request auth="no">
|
||||
<method>PROPFIND</method>
|
||||
<ruri>$principals_users:</ruri>
|
||||
<header>
|
||||
<name>Depth</name>
|
||||
<value>0</value>
|
||||
</header>
|
||||
<data>
|
||||
<content-type>text/xml; charset=utf-8</content-type>
|
||||
<filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
|
||||
</data>
|
||||
<verify>
|
||||
<callback>statusCode</callback>
|
||||
<arg>
|
||||
<name>status</name>
|
||||
<value>401</value>
|
||||
</arg>
|
||||
</verify>
|
||||
</request>
|
||||
</test>
|
||||
<test name='3'>
|
||||
<description>Check for authenticated property on / (user02)</description>
|
||||
<request user="$userid2:" pswd="$pswd2:">
|
||||
<method>PROPFIND</method>
|
||||
<ruri>$principalcollection:</ruri>
|
||||
<header>
|
||||
<name>Depth</name>
|
||||
<value>0</value>
|
||||
</header>
|
||||
<data>
|
||||
<content-type>text/xml; charset=utf-8</content-type>
|
||||
<filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
|
||||
</data>
|
||||
<verify>
|
||||
<callback>propfindItems</callback>
|
||||
<arg>
|
||||
<name>okprops</name>
|
||||
<value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri2:</href>]]></value>
|
||||
</arg>
|
||||
</verify>
|
||||
</request>
|
||||
</test>
|
||||
</test-suite>
|
||||
|
||||
<end/>
|
||||
</caldavtest>
|
3512
apps/dav/tests/travis/caldavtest/tests/CalDAV/sync-report.xml
Normal file
3512
apps/dav/tests/travis/caldavtest/tests/CalDAV/sync-report.xml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue