mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
New regression tests for tickets.
This commit is contained in:
parent
41bba921cb
commit
118b9c44b5
89
testing/tests/regression-suite/954-PROPFIND.result
Normal file
89
testing/tests/regression-suite/954-PROPFIND.result
Normal file
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:TKT="http://www.xythos.com/namespaces/StorageServer">
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<all/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unlock/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-acl/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-acl/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:read-free-busy/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-properties/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-content/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<bind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unbind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-deliver/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-deliver-invite/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-deliver-reply/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-query-freebusy/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-send/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-send-invite/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-send-reply/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<C:schedule-send-freebusy/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
<TKT:ticketdiscovery>
|
||||
<TKT:ticketinfo>
|
||||
<TKT:id>Good Ticket ID</TKT:id>
|
||||
<TKT:owner>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</TKT:owner>
|
||||
<TKT:timeout>Seconds-3600</TKT:timeout>
|
||||
<TKT:visits>infinity</TKT:visits>
|
||||
<privilege>
|
||||
<read/>
|
||||
<read-current-user-privilege-set/>
|
||||
<C:read-free-busy/>
|
||||
<C:schedule-query-freebusy/>
|
||||
</privilege>
|
||||
</TKT:ticketinfo>
|
||||
</TKT:ticketdiscovery>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
23
testing/tests/regression-suite/954-PROPFIND.test
Normal file
23
testing/tests/regression-suite/954-PROPFIND.test
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# PROPFIND as owner retrieving the tickets on that resource.
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user1/home/
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEADER=Depth: 0
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<propfind xmlns="DAV:"
|
||||
xmlns:T="http://www.xythos.com/namespaces/StorageServer">
|
||||
<prop>
|
||||
<current-user-privilege-set/>
|
||||
<T:ticketdiscovery/>
|
||||
</prop>
|
||||
</propfind>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=!<TKT:id>\S{8}</TKT:id>!<TKT:id>Good Ticket ID</TKT:id>!
|
||||
REPLACE=!<TKT:timeout>Seconds-3\d+</TKT:timeout>!<TKT:timeout>Seconds-3600</TKT:timeout>!
|
||||
13
testing/tests/regression-suite/955-DELTICKET.result
Normal file
13
testing/tests/regression-suite/955-DELTICKET.result
Normal file
@ -0,0 +1,13 @@
|
||||
HTTP/1.1 204 No Content
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
dav_owner_id: >3<
|
||||
privileges: >000000000001001000100001<
|
||||
target_collection: >10<
|
||||
target_resource_i: >NULL<
|
||||
timeout: >01:00:00<
|
||||
|
||||
33
testing/tests/regression-suite/955-DELTICKET.test
Normal file
33
testing/tests/regression-suite/955-DELTICKET.test
Normal file
@ -0,0 +1,33 @@
|
||||
#
|
||||
# DELTICKET the resource ticket we created back in 950...
|
||||
#
|
||||
TYPE=DELTICKET
|
||||
URL=http://regression.host/caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEAD
|
||||
|
||||
# Get the ticket we created earlier in 950...
|
||||
GETSQL=ticket
|
||||
SELECT ticket_id FROM access_ticket
|
||||
WHERE target_collection_id = 10 AND target_resource_id IS NOT NULL;
|
||||
ENDSQL
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Ticket: ##ticket##
|
||||
HEADER=Depth: 0
|
||||
|
||||
BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_owner_id,
|
||||
date_trunc( 'minute', ('55 seconds' + expires - current_timestamp)::interval(0)) AS timeout,
|
||||
privileges,
|
||||
target_collection_id,
|
||||
target_resource_id
|
||||
FROM access_ticket
|
||||
ENDQUERY
|
||||
|
||||
# REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
# REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
|
||||
Loading…
x
Reference in New Issue
Block a user