mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-18 01:31:21 +00:00
This allows us to have more complex test files where an action is taken, then we test something, then another action is taken, etc. Changes to test files are required so that URL is defined after all the required settings are set. Changes to the result files are either whitespace changes due to above logic changes, or printing out a SQL Result header before each result. I figured it was useful.
33 lines
911 B
Plaintext
33 lines
911 B
Plaintext
#
|
|
# MKTICKET request for a ticket on a collection resource
|
|
#
|
|
TYPE=MKTICKET
|
|
HEADER=User-Agent: Ticket Spec Tests
|
|
HEADER=Content-Type: text/xml; charset="UTF-8"
|
|
HEAD
|
|
|
|
|
|
BEGINDATA
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
<D:ticketinfo xmlns:D="DAV:" >
|
|
<D:privilege><D:write/></D:privilege>
|
|
<D:timeout>Second-86400</D:timeout>
|
|
</D:ticketinfo>
|
|
ENDDATA
|
|
|
|
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
|
REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
|
|
REPLACE=!ETag: "\S+"!ETag: "Some good ETag"!
|
|
REPLACE=!<TKT:timeout>Seconds-3\d+</TKT:timeout>!<TKT:timeout>Seconds-3600</TKT:timeout>!
|
|
|
|
URL=http://regression.host/caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics
|
|
|
|
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
|