davical/testing/tests/regression-suite/0955-DELTICKET.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

34 lines
838 B
Plaintext

#
# DELTICKET the resource ticket we created back in 950...
#
TYPE=DELTICKET
HEADER=User-Agent: Ticket Spec Tests
HEAD
# Get the ticket we created earlier in 950...
GETSQL=ticket
SELECT ticket_id FROM access_ticket
WHERE target_collection_id = 160 AND target_resource_id IS NOT NULL;
ENDSQL
HEADER=User-Agent: Ticket Spec Tests
HEADER=Ticket: ##ticket##
HEADER=Depth: 0
BEGINDATA
ENDDATA
# REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
# REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
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