mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-25 15:10:13 +00:00
Corrected ticekt-related regression tests.
This commit is contained in:
parent
c6745c97b0
commit
c37df9a88e
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<prop xmlns="DAV:" xmlns:http://www.xythos.com/namespaces/StorageServer="T">
|
||||
<prop xmlns="DAV:" xmlns:T="http://www.xythos.com/namespaces/StorageServer" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<T:ticketdiscovery>
|
||||
<T:ticketinfo>
|
||||
<T:id>Good Ticket ID</T:id>
|
||||
@ -7,10 +7,10 @@
|
||||
<href>/caldav.php/user1/</href>
|
||||
</owner>
|
||||
<privilege>
|
||||
<DAV::read/>
|
||||
<DAV::read-current-user-privilege-set/>
|
||||
<urn:ietf:params:xml:ns:caldav:read-free-busy/>
|
||||
<urn:ietf:params:xml:ns:caldav:schedule-query-freebusy/>
|
||||
<read/>
|
||||
<read-current-user-privilege-set/>
|
||||
<C:read-free-busy/>
|
||||
<C:schedule-query-freebusy/>
|
||||
</privilege>
|
||||
<T:timeout>Second-3600</T:timeout>
|
||||
<T:visits>infinity</T:visits>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
HTTP/1.1 400 Bad Request
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
ETag: "960996e0df498010929014e5d8385771"
|
||||
ETag: "7bc3d8a76fb705dfff8a6654bb8d7fb8"
|
||||
Content-Length: 155
|
||||
Connection: close
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<error xmlns="DAV:" xmlns:http://www.xythos.com/namespaces/StorageServer="T">
|
||||
<error xmlns="DAV:" xmlns:T="http://www.xythos.com/namespaces/StorageServer">
|
||||
<missing-xml-for-request/>
|
||||
</error>
|
||||
|
||||
@ -15,5 +15,5 @@ Content-Type: text/xml; charset="utf-8"
|
||||
privileges: >000000000001001000100001<
|
||||
target_collection: >10<
|
||||
target_resource_i: >NULL<
|
||||
timeout: >00:59:01<
|
||||
timeout: >01:00:00<
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_owner_id,
|
||||
(expires - current_timestamp)::interval(0) AS timeout,
|
||||
date_trunc( 'minute', (expires - current_timestamp + '30 seconds')::interval(0)) AS timeout,
|
||||
privileges,
|
||||
target_collection_id,
|
||||
target_resource_id
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<prop xmlns="DAV:" xmlns:http://www.xythos.com/namespaces/StorageServer="T">
|
||||
<prop xmlns="DAV:" xmlns:T="http://www.xythos.com/namespaces/StorageServer" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<T:ticketdiscovery>
|
||||
<T:ticketinfo>
|
||||
<T:id>Good Ticket ID</T:id>
|
||||
@ -7,15 +7,15 @@
|
||||
<href>/caldav.php/user1/</href>
|
||||
</owner>
|
||||
<privilege>
|
||||
<DAV::read/>
|
||||
<DAV::read-current-user-privilege-set/>
|
||||
<urn:ietf:params:xml:ns:caldav:read-free-busy/>
|
||||
<DAV::write/>
|
||||
<DAV::write-properties/>
|
||||
<DAV::write-content/>
|
||||
<DAV::bind/>
|
||||
<DAV::unbind/>
|
||||
<urn:ietf:params:xml:ns:caldav:schedule-query-freebusy/>
|
||||
<read/>
|
||||
<read-current-user-privilege-set/>
|
||||
<C:read-free-busy/>
|
||||
<write/>
|
||||
<write-properties/>
|
||||
<write-content/>
|
||||
<bind/>
|
||||
<unbind/>
|
||||
<C:schedule-query-freebusy/>
|
||||
</privilege>
|
||||
<T:timeout>Second-86400</T:timeout>
|
||||
<T:visits>infinity</T:visits>
|
||||
@ -27,11 +27,11 @@
|
||||
privileges: >000000000001001000100001<
|
||||
target_collection: >10<
|
||||
target_resource_i: >NULL<
|
||||
timeout: >00:58:51<
|
||||
timeout: >01:00:00<
|
||||
|
||||
dav_owner_id: >3<
|
||||
privileges: >000000000001001011100111<
|
||||
target_collection: >10<
|
||||
target_resource_i: >1365<
|
||||
timeout: >24:00:00<
|
||||
timeout: >1 day<
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_owner_id,
|
||||
(expires - current_timestamp)::interval(0) AS timeout,
|
||||
date_trunc( 'minute', ('55 seconds' + expires - current_timestamp)::interval(0)) AS timeout,
|
||||
privileges,
|
||||
target_collection_id,
|
||||
target_resource_id
|
||||
|
||||
@ -14,11 +14,11 @@
|
||||
privileges: >000000000001001000100001<
|
||||
target_collection: >10<
|
||||
target_resource_i: >NULL<
|
||||
timeout: >00:58:35<
|
||||
timeout: >01:00:00<
|
||||
|
||||
dav_owner_id: >3<
|
||||
privileges: >000000000001001011100111<
|
||||
target_collection: >10<
|
||||
target_resource_i: >1365<
|
||||
timeout: >23:59:43<
|
||||
timeout: >24:00:00<
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_owner_id,
|
||||
(expires - current_timestamp)::interval(0) AS timeout,
|
||||
date_trunc( 'minute', (expires - current_timestamp + '55 seconds')::interval(0)) AS timeout,
|
||||
privileges,
|
||||
target_collection_id,
|
||||
target_resource_id
|
||||
|
||||
121
testing/tests/regression-suite/952-PROPFIND.result
Normal file
121
testing/tests/regression-suite/952-PROPFIND.result
Normal file
@ -0,0 +1,121 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
ETag: "7c8b51dfb3d0b3caa8da3ab3f98c3707"
|
||||
Content-Length: 2895
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>User One's Calendar</displayname>
|
||||
<supported-report-set>
|
||||
<supported-report>
|
||||
<report>
|
||||
<principal-property-search/>
|
||||
</report>
|
||||
</supported-report>
|
||||
<supported-report>
|
||||
<report>
|
||||
<principal-search-property-set/>
|
||||
</report>
|
||||
</supported-report>
|
||||
<supported-report>
|
||||
<report>
|
||||
<expand-property/>
|
||||
</report>
|
||||
</supported-report>
|
||||
<supported-report>
|
||||
<report>
|
||||
<sync-collection/>
|
||||
</report>
|
||||
</supported-report>
|
||||
<supported-report>
|
||||
<report>
|
||||
<C:calendar-query/>
|
||||
</report>
|
||||
</supported-report>
|
||||
<supported-report>
|
||||
<report>
|
||||
<C:calendar-multiget/>
|
||||
</report>
|
||||
</supported-report>
|
||||
<supported-report>
|
||||
<report>
|
||||
<C:free-busy-query/>
|
||||
</report>
|
||||
</supported-report>
|
||||
</supported-report-set>
|
||||
<supported-method-set>
|
||||
<supported-method name="OPTIONS"/>
|
||||
<supported-method name="PROPFIND"/>
|
||||
<supported-method name="REPORT"/>
|
||||
<supported-method name="DELETE"/>
|
||||
<supported-method name="LOCK"/>
|
||||
<supported-method name="UNLOCK"/>
|
||||
<supported-method name="MOVE"/>
|
||||
<supported-method name="GET"/>
|
||||
<supported-method name="PUT"/>
|
||||
<supported-method name="HEAD"/>
|
||||
<supported-method name="MKTICKET"/>
|
||||
</supported-method-set>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:read-free-busy/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-query-freebusy/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
<C:supported-calendar-component-set>
|
||||
<C:comp name="VEVENT"/>
|
||||
<C:comp name="VTODO"/>
|
||||
<C:comp name="VJOURNAL"/>
|
||||
<C:comp name="VTIMEZONE"/>
|
||||
<C:comp name="VFREEBUSY"/>
|
||||
</C:supported-calendar-component-set>
|
||||
<C:calendar-timezone>BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Europe/Prague
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+0100
|
||||
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
|
||||
DTSTART:19810329T020000
|
||||
TZNAME:GMT+02:00
|
||||
TZOFFSETTO:+0200
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+0200
|
||||
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
|
||||
DTSTART:19961027T030000
|
||||
TZNAME:GMT+01:00
|
||||
TZOFFSETTO:+0100
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
END:VCALENDAR
|
||||
</C:calendar-timezone>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:calendar-description/>
|
||||
<C:schedule-calendar-transp/>
|
||||
<C:schedule-default-calendar-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
38
testing/tests/regression-suite/952-PROPFIND.test
Normal file
38
testing/tests/regression-suite/952-PROPFIND.test
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# PROPFIND on a collection which we can only access via a ticket
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user1/home/
|
||||
AUTH=user5:user5
|
||||
|
||||
# Get the ticket we created earlier in 948...
|
||||
GETSQL=ticket
|
||||
SELECT ticket_id FROM access_ticket
|
||||
WHERE target_collection_id = 10 AND target_resource_id is null;
|
||||
ENDSQL
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEADER=Ticket: ##ticket##
|
||||
HEADER=Depth: 0
|
||||
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<propfind xmlns="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav">
|
||||
<prop>
|
||||
<displayname/>
|
||||
<supported-report-set/>
|
||||
<supported-method-set/>
|
||||
<current-user-privilege-set/>
|
||||
<caldav:calendar-description/>
|
||||
<caldav:supported-calendar-component-set/>
|
||||
<caldav:schedule-calendar-transp/>
|
||||
<caldav:schedule-default-calendar-URL/>
|
||||
<caldav:calendar-timezone/>
|
||||
</prop>
|
||||
</propfind>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
11
testing/tests/regression-suite/953-PROPFIND.result
Normal file
11
testing/tests/regression-suite/953-PROPFIND.result
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<error xmlns="DAV:">
|
||||
<need-privileges>
|
||||
<resource>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
</resource>
|
||||
</need-privileges>
|
||||
</error>
|
||||
37
testing/tests/regression-suite/953-PROPFIND.test
Normal file
37
testing/tests/regression-suite/953-PROPFIND.test
Normal file
@ -0,0 +1,37 @@
|
||||
#
|
||||
# PROPFIND on a collection which we can only access via a ticket
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user1/home/
|
||||
AUTH=user5:user5
|
||||
|
||||
# Get the ticket we created earlier in 948...
|
||||
GETSQL=ticket
|
||||
SELECT ticket_id FROM access_ticket
|
||||
WHERE target_collection_id = 10 AND target_resource_id is null;
|
||||
ENDSQL
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
# HEADER=Ticket: ##ticket##
|
||||
HEADER=Depth: 0
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<propfind xmlns="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav">
|
||||
<prop>
|
||||
<displayname/>
|
||||
<supported-report-set/>
|
||||
<supported-method-set/>
|
||||
<current-user-privilege-set/>
|
||||
<caldav:calendar-description/>
|
||||
<caldav:supported-calendar-component-set/>
|
||||
<caldav:schedule-calendar-transp/>
|
||||
<caldav:schedule-default-calendar-URL/>
|
||||
<caldav:calendar-timezone/>
|
||||
</prop>
|
||||
</propfind>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
Loading…
x
Reference in New Issue
Block a user