Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
e4900c6c
Commit
e4900c6c
authored
Nov 10, 2015
by
Thomas Müller
Browse files
Merge pull request #20195 from owncloud/add-caldavtester
Add CalDAVTester to travis
parents
bbe2f5c2
af94c880
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
e4900c6c
...
...
@@ -36,6 +36,8 @@ matrix:
include
:
-
php
:
5.4
env
:
DB=pgsql;TC=litmus-v1
-
php
:
5.4
env
:
DB=pgsql;TC=carddavtester
# - php: 5.4
# env: DB=mysql;TC=caldavtester
...
...
apps/dav/tests/travis/caldavtest/config/serverinfo.dtd
0 → 100644
View file @
e4900c6c
<!--
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.
-->
<!ELEMENT serverinfo (host, path, nonsslport, sslport, unix?,
host2?, nonsslport2?, sslport2?, unix2?,
authtype?, waitcount?, waitdelay?, waitsuccess?,
features?, substitutions)? >
<!ELEMENT host (#PCDATA)>
<!ELEMENT path (#PCDATA)>
<!ELEMENT nonsslport (#PCDATA)>
<!ELEMENT sslport (#PCDATA)>
<!ELEMENT unix (#PCDATA)>
<!ELEMENT host2 (#PCDATA)>
<!ELEMENT nonsslport2 (#PCDATA)>
<!ELEMENT sslport2 (#PCDATA)>
<!ELEMENT unix2 (#PCDATA)>
<!ELEMENT authtype (#PCDATA)>
<!ELEMENT waitdelay (#PCDATA)>
<!ELEMENT waitcount (#PCDATA)>
<!ELEMENT waitsuccess (#PCDATA)>
<!ELEMENT features (feature*)>
<!ELEMENT feature (#PCDATA)>
<!ELEMENT substitutions (substitution|repeat)*>
<!ELEMENT repeat (substitution+)>
<!ATTLIST repeat count CDATA "1">
<!ELEMENT substitution (key, value)>
<!ELEMENT key (#PCDATA)>
<!ELEMENT value (#PCDATA)>
apps/dav/tests/travis/caldavtest/config/serverinfo.xml
0 → 100644
View file @
e4900c6c
This diff is collapsed.
Click to expand it.
apps/dav/tests/travis/caldavtest/tests/CardDAV/current-user-principal.xml
0 → 100644
View file @
e4900c6c
<?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>
carddav
</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/CardDAV/vcurrent-user-principal/1.xml
</filepath>
</data>
<verify>
<callback>
propfindItems
</callback>
<arg>
<name>
okprops
</name>
<value>
<![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri1:</D: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/CardDAV/vcurrent-user-principal/1.xml
</filepath>
</data>
<verify>
<callback>
propfindItems
</callback>
<arg>
<name>
okprops
</name>
<value>
<![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri2:</D: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/CardDAV/vcurrent-user-principal/1.xml
</filepath>
</data>
<verify>
<callback>
propfindItems
</callback>
<arg>
<name>
okprops
</name>
<value>
<![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri1:</D:href>]]>
</value>
</arg>
</verify>
</request>
</test>
<test
name=
'2'
>
<description>
Check for unauthenticated property on /
</description>
<request
auth=
"no"
>
<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/CardDAV/vcurrent-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/CardDAV/vcurrent-user-principal/1.xml
</filepath>
</data>
<verify>
<callback>
propfindItems
</callback>
<arg>
<name>
okprops
</name>
<value>
<![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri2:</D:href>]]>
</value>
</arg>
</verify>
</request>
</test>
</test-suite>
<end/>
</caldavtest>
apps/dav/tests/travis/carddavtester.sh
0 → 100644
View file @
e4900c6c
#!/usr/bin/env bash
SCRIPT
=
`
realpath
$0
`
SCRIPTPATH
=
`
dirname
$SCRIPT
`
# start the server
php
-S
127.0.0.1:8888
-t
"
$SCRIPTPATH
/../../../.."
&
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
OC_PASS
=
user02 php occ user:add
--password-from-env
user02
cd
"
$SCRIPTPATH
/../../../../"
# 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/CardDAV/current-user-principal.xml"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment