mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-29 15:51:27 +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.
30 lines
729 B
Plaintext
30 lines
729 B
Plaintext
#
|
|
# Test specification compliance for LOCK request
|
|
# - Refresh the lock
|
|
# No data is needed for a refresh
|
|
#
|
|
TYPE=LOCK
|
|
|
|
# Save the original lock time for later use
|
|
GETSQL=oldlocktime
|
|
SELECT start FROM locks WHERE dav_name = '/user1/home/'
|
|
ENDSQL
|
|
|
|
# Get the lock token from the earlier lock
|
|
GETSQL=locktoken
|
|
SELECT opaquelocktoken FROM locks WHERE dav_name = '/user1/home/'
|
|
ENDSQL
|
|
|
|
HEADER=Depth: 0
|
|
HEADER=Timeout: Infinite,Second-4100000000
|
|
HEADER=Lock-Token: <opaquelocktoken:##locktoken##>
|
|
HEAD
|
|
|
|
URL=http://regression.host/caldav.php/user1/home/
|
|
|
|
#
|
|
# Do a query after the request
|
|
QUERY
|
|
SELECT 'Refreshed (should be 1)', start != '##oldlocktime##'::timestamp AS refresh_success FROM locks WHERE dav_name = '/user1/home/'
|
|
ENDQUERY
|