mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-30 18:37:12 +00:00
More tests for LOCK / UNLOCK on resources.
This commit is contained in:
parent
a722e11b56
commit
9c069a3f1a
12
testing/tests/regression-suite/802-Spec-LOCK-1.result
Normal file
12
testing/tests/regression-suite/802-Spec-LOCK-1.result
Normal file
@ -0,0 +1,12 @@
|
||||
HTTP/1.1 423 Locked
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
Content-Length: 198
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>/user1/home/i1278618276.ics</href>
|
||||
<status>HTTP/1.1 423 Resource Locked</status>
|
||||
</response>
|
||||
</multistatus>
|
||||
26
testing/tests/regression-suite/802-Spec-LOCK-1.test
Normal file
26
testing/tests/regression-suite/802-Spec-LOCK-1.test
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# Test specification compliance for LOCK request
|
||||
# - This is a request for something which is already locked
|
||||
# and should fail.
|
||||
#
|
||||
TYPE=LOCK
|
||||
URL=http://mycaldav/caldav.php/user1/home/i1278618276.ics
|
||||
HEADER=Depth: 0
|
||||
HEADER=Timeout: Infinite,Second-4100000000
|
||||
HEADER=Content-type: text/xml; charset="utf-8"
|
||||
HEAD
|
||||
|
||||
#
|
||||
# Include the data in-line
|
||||
#
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<D:lockinfo xmlns:D='DAV:'>
|
||||
<D:lockscope><D:exclusive/></D:lockscope>
|
||||
<D:locktype><D:write/></D:locktype>
|
||||
<D:owner>
|
||||
<D:href>http://andrew.mcmillan.net.nz/node/5/</D:href>
|
||||
</D:owner>
|
||||
</D:lockinfo>
|
||||
ENDDATA
|
||||
|
||||
12
testing/tests/regression-suite/803-Spec-UNLOCK-1.result
Normal file
12
testing/tests/regression-suite/803-Spec-UNLOCK-1.result
Normal file
@ -0,0 +1,12 @@
|
||||
HTTP/1.1 423 Locked
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
Content-Length: 198
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>/user1/home/i1278618276.ics</href>
|
||||
<status>HTTP/1.1 423 Resource Locked</status>
|
||||
</response>
|
||||
</multistatus>
|
||||
14
testing/tests/regression-suite/803-Spec-UNLOCK-1.test
Normal file
14
testing/tests/regression-suite/803-Spec-UNLOCK-1.test
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Test specification compliance for LOCK/UNLOCK request
|
||||
# - This should fail because we provide an invalid lock token
|
||||
#
|
||||
TYPE=UNLOCK
|
||||
URL=http://mycaldav/caldav.php/user1/home/i1278618276.ics
|
||||
|
||||
HEADER=Content-type: text/xml; charset="utf-8"
|
||||
HEADER=Lock-Token: <opaquelocktoken:cafefeed-c001-b055-ea75-deadbeef4a11>
|
||||
HEAD
|
||||
|
||||
#
|
||||
# There is no data for an UNLOCK request
|
||||
#
|
||||
5
testing/tests/regression-suite/804-Spec-UNLOCK-1.result
Normal file
5
testing/tests/regression-suite/804-Spec-UNLOCK-1.result
Normal file
@ -0,0 +1,5 @@
|
||||
HTTP/1.1 204 No Content
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
||||
16
testing/tests/regression-suite/804-Spec-UNLOCK-1.test
Normal file
16
testing/tests/regression-suite/804-Spec-UNLOCK-1.test
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Test specification compliance for LOCK/UNLOCK request
|
||||
#
|
||||
TYPE=UNLOCK
|
||||
URL=http://mycaldav/caldav.php/user1/home/i1278618276.ics
|
||||
|
||||
# Get the lock token from the earlier lock
|
||||
GETSQL=locktoken
|
||||
SELECT opaquelocktoken FROM locks WHERE dav_name = '/user1/home/i1278618276.ics'
|
||||
ENDSQL
|
||||
|
||||
HEADER=Lock-Token: <opaquelocktoken:##locktoken##>
|
||||
HEAD
|
||||
|
||||
# There is no data for an UNLOCK request
|
||||
#
|
||||
Loading…
x
Reference in New Issue
Block a user