davical/testing/tests/binding/1024-BIND.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

40 lines
804 B
Plaintext

#
# BIND a collection into an additional location
# also applying a ticket during the bind
#
TYPE=BIND
AUTH=user4:user4
# Get the ticket we created earlier in 999...
GETSQL=ticket
SELECT ticket_id FROM access_ticket
WHERE target_collection_id = 161 AND target_resource_id is null;
ENDSQL
HEADER=User-Agent: Ticket Spec Tests
HEADER=Content-Type: text/xml; charset="UTF-8"
HEADER=Ticket: ##ticket##
HEAD
BEGINDATA
<?xml version="1.0" encoding="utf-8"?>
<bind xmlns="DAV:">
<segment>user2</segment>
<href>/caldav.php/user2/home</href>
</bind>
ENDDATA
URL=http://regression.host/caldav.php/user4/base/
QUERY
SELECT bind_id,
bound_source_id,
length(access_ticket_id),
parent_container,
dav_name,
dav_displayname
FROM dav_binding
ENDQUERY