#
# MKTICKET request for a read/write ticket on a collection
# - ticket should have no expiry
#
TYPE=MKTICKET
URL=http://regression.host/caldav.php/user3/home/
HEADER=User-Agent: Ticket Spec Tests
HEADER=Content-Type: text/xml; charset="UTF-8"
HEAD
AUTH=admin:nimda
BEGINDATA
infinity
ENDDATA
QUERY
SELECT access_ticket.dav_owner_id,
date_trunc( 'minute', ('55 seconds' + access_ticket.expires - current_timestamp)::interval(0)) AS timeout,
access_ticket.privileges,
target_collection_id,
target_resource_id,
collection.dav_name
FROM access_ticket
INNER JOIN collection ON (collection_id = target_collection_id)
WHERE collection.dav_name = '/user3/home/'
ENDQUERY
# WHERE target_collection = 161
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!
REPLACE=!\S{8}!Good Ticket ID!
REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!