davical/testing/tests/regression-suite/0951-MKTICKET.test
Andrew Ruthven 7c47658bee Make the curl and SQL requests when we see them
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.
2024-04-01 22:57:10 +13:00

30 lines
723 B
Plaintext

#
# MKTICKET request for a ticket on a collection we don't have rights to
#
TYPE=MKTICKET
HEADER=User-Agent: Ticket Spec Tests
HEADER=Content-Type: text/xml; charset="UTF-8"
BEGINDATA
<?xml version="1.0" encoding="utf-8" ?>
<D:ticketinfo xmlns:D="DAV:" >
<D:privilege><D:read/></D:privilege>
<D:timeout>Second-3600</D:timeout>
<D:visits>1</D:visits>
</D:ticketinfo>
ENDDATA
URL=http://regression.host/caldav.php/user4/home/
QUERY
SELECT dav_owner_id,
date_trunc( 'minute', (expires - current_timestamp + '55 seconds')::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>!