mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-28 15:40:14 +00:00
Moving regression tests for WebDAV Bindings.
This commit is contained in:
parent
36dd272d9a
commit
6e9cc9dcfd
@ -7,7 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >User 2's Calendar, as uploaded by Admin<
|
||||
dav_name: >/user4/user2/<
|
||||
@ -9,7 +9,7 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<error xmlns="DAV:">
|
||||
<DAV::can-overwrite/>A resource already exists at the destination.
|
||||
</error>
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >User 2's Calendar, as uploaded by Admin<
|
||||
dav_name: >/user4/user2/<
|
||||
@ -10,8 +10,8 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
<href>/</href>
|
||||
<segment>caldav.php</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
</prop>
|
||||
@ -28,11 +28,11 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user2</href>
|
||||
<segment>home</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user2</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
@ -50,8 +50,8 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>home</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
</prop>
|
||||
@ -65,8 +65,8 @@
|
||||
<displayname>/user4/calendar-proxy-read/</displayname>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>calendar-proxy-read</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
</prop>
|
||||
@ -86,8 +86,8 @@
|
||||
<displayname>/user4/calendar-proxy-write/</displayname>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>calendar-proxy-write</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
</prop>
|
||||
@ -53,15 +53,32 @@
|
||||
<owner>
|
||||
<href>/caldav.php/user2/</href>
|
||||
</owner>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-properties/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-content/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<bind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unbind/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<current-user-privilege-set/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 403 Forbidden</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user4/user2/047871e3-6b70-4178-9af8-0ceb50f7b092.ics</href>
|
||||
@ -72,15 +89,32 @@
|
||||
<owner>
|
||||
<href>/caldav.php/user2/</href>
|
||||
</owner>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-properties/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-content/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<bind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unbind/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<current-user-privilege-set/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 403 Forbidden</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user4/user2/9429a973-2b13-4b1a-be09-948d75425c45.ics</href>
|
||||
@ -91,15 +125,32 @@
|
||||
<owner>
|
||||
<href>/caldav.php/user2/</href>
|
||||
</owner>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-properties/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-content/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<bind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unbind/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<current-user-privilege-set/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 403 Forbidden</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user4/user2/7d729xc0-0895-012d-124e-002421a2359e.ics</href>
|
||||
@ -110,15 +161,32 @@
|
||||
<owner>
|
||||
<href>/caldav.php/user2/</href>
|
||||
</owner>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-properties/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-content/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<bind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unbind/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<current-user-privilege-set/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 403 Forbidden</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user4/user2/bd262d20-1cdb-012d-1264-002421a2359e.ics</href>
|
||||
@ -129,14 +197,31 @@
|
||||
<owner>
|
||||
<href>/caldav.php/user2/</href>
|
||||
</owner>
|
||||
<current-user-privilege-set>
|
||||
<privilege>
|
||||
<read/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<read-current-user-privilege-set/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-properties/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<write-content/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<bind/>
|
||||
</privilege>
|
||||
<privilege>
|
||||
<unbind/>
|
||||
</privilege>
|
||||
</current-user-privilege-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<current-user-privilege-set/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 403 Forbidden</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -2,29 +2,22 @@ HTTP/1.1 201 Created
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule
|
||||
Location: /caldav.php/user4/base/user1/
|
||||
Location: /caldav.php/user4/user1/
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
dav_name: >/user4/user2/<
|
||||
length: >8<
|
||||
parent_container: >/user4/<
|
||||
ticket_id_length: >8<
|
||||
|
||||
bind_id: >1434<
|
||||
bind_id: >1435<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/user1/<
|
||||
length: >8<
|
||||
parent_container: >/user4/<
|
||||
|
||||
bind_id: >1439<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/base/user1/<
|
||||
length: >8<
|
||||
parent_container: >/user4/base/<
|
||||
ticket_id_length: >8<
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 948...
|
||||
@ -29,7 +29,7 @@ ENDDATA
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
length(access_ticket_id),
|
||||
length(access_ticket_id) AS ticket_id_length,
|
||||
parent_container,
|
||||
dav_name,
|
||||
dav_displayname
|
||||
|
||||
@ -2,22 +2,29 @@ HTTP/1.1 201 Created
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule
|
||||
Location: /caldav.php/user4/user1/
|
||||
Location: /caldav.php/user4/base/user1/
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
dav_name: >/user4/user2/<
|
||||
length: >8<
|
||||
parent_container: >/user4/<
|
||||
ticket_id_length: >8<
|
||||
|
||||
bind_id: >1434<
|
||||
bind_id: >1435<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/user1/<
|
||||
length: >8<
|
||||
parent_container: >/user4/<
|
||||
ticket_id_length: >8<
|
||||
|
||||
bind_id: >1439<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/base/user1/<
|
||||
length: >8<
|
||||
parent_container: >/user4/base/<
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 948...
|
||||
@ -29,7 +29,7 @@ ENDDATA
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
length(access_ticket_id) AS ticket_id_length,
|
||||
length(access_ticket_id),
|
||||
parent_container,
|
||||
dav_name,
|
||||
dav_displayname
|
||||
@ -7,14 +7,14 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
dav_name: >/user4/user2/<
|
||||
length: >8<
|
||||
parent_container: >/user4/<
|
||||
|
||||
bind_id: >1434<
|
||||
bind_id: >1435<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/user1/<
|
||||
@ -9,14 +9,14 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<error xmlns="DAV:">
|
||||
<DAV::can-overwrite/>A resource already exists at the destination.
|
||||
</error>
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
dav_name: >/user4/user2/<
|
||||
length: >8<
|
||||
parent_container: >/user4/<
|
||||
|
||||
bind_id: >1434<
|
||||
bind_id: >1435<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/user1/<
|
||||
@ -10,8 +10,8 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>base</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
<resourcetype>
|
||||
@ -31,15 +31,15 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user1</href>
|
||||
<segment>home</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php/user4/base</href>
|
||||
<segment>user1</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>base</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user1</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
@ -63,15 +63,15 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user2</href>
|
||||
<segment>home</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php/user4/base</href>
|
||||
<segment>user2</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>base</segment>
|
||||
</parent>
|
||||
<parent>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user2</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
@ -94,8 +94,8 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user4/base</href>
|
||||
<segment>calendar</segment>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>base</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
<resourcetype>
|
||||
@ -10,8 +10,8 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php/user4</href>
|
||||
<segment>base</segment>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
<resourcetype>
|
||||
@ -12,8 +12,8 @@
|
||||
</resource-id>
|
||||
<parent-set>
|
||||
<parent>
|
||||
<href>/caldav.php</href>
|
||||
<segment>user4</segment>
|
||||
<href>/</href>
|
||||
<segment>caldav.php</segment>
|
||||
</parent>
|
||||
</parent-set>
|
||||
<resourcetype>
|
||||
@ -30,18 +30,7 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</T:ticketdiscovery>
|
||||
</prop>
|
||||
|
||||
dav_owner_id: >3<
|
||||
privileges: >000000000001001000100001<
|
||||
target_collection: >10<
|
||||
target_resource_i: >NULL<
|
||||
timeout: >01:00:00<
|
||||
|
||||
dav_owner_id: >4<
|
||||
privileges: >000000000001001011100111<
|
||||
target_collection: >11<
|
||||
target_resource_i: >NULL<
|
||||
timeout: >NULL<
|
||||
|
||||
dav_name: >/user3/home/<
|
||||
dav_owner_id: >1<
|
||||
privileges: >000000000001001011100111<
|
||||
target_collection: >12<
|
||||
@ -18,13 +18,17 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_owner_id,
|
||||
date_trunc( 'minute', ('55 seconds' + expires - current_timestamp)::interval(0)) AS timeout,
|
||||
privileges,
|
||||
SELECT access_ticket.dav_owner_id,
|
||||
date_trunc( 'minute', ('55 seconds' + access_ticket.expires - current_timestamp)::interval(0)) AS timeout,
|
||||
access_ticket.privileges,
|
||||
target_collection_id,
|
||||
target_resource_id
|
||||
target_resource_id,
|
||||
collection.dav_name
|
||||
FROM access_ticket
|
||||
INNER JOIN collection ON (collection_id = target_collection_id)
|
||||
WHERE collection.dav_name = '/user3/home/'
|
||||
ENDQUERY
|
||||
# WHERE target_collection = 11
|
||||
|
||||
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
@ -7,7 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
bind_id: >1433<
|
||||
bind_id: >1434<
|
||||
bind_owner: >6<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
@ -19,7 +19,7 @@ target_collection: >11<
|
||||
target_resource_i: >NULL<
|
||||
ticket_owner: >4<
|
||||
|
||||
bind_id: >1434<
|
||||
bind_id: >1435<
|
||||
bind_owner: >6<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
Loading…
x
Reference in New Issue
Block a user