From 52695d86ec316c95c48073a2e4f84c632ef703c7 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 2 Sep 2010 23:06:09 +1200 Subject: [PATCH] More binding tests. --- testing/tests/binding/1100-BIND.result | 44 ++++++ testing/tests/binding/1100-BIND.test | 39 +++++ .../tests/binding/1101-PROPFIND-normal.result | 131 ++++++++++++++++ .../tests/binding/1101-PROPFIND-normal.test | 27 ++++ .../tests/binding/1102-PROPFIND-bound.result | 148 ++++++++++++++++++ .../tests/binding/1102-PROPFIND-bound.test | 27 ++++ 6 files changed, 416 insertions(+) create mode 100644 testing/tests/binding/1100-BIND.result create mode 100644 testing/tests/binding/1100-BIND.test create mode 100644 testing/tests/binding/1101-PROPFIND-normal.result create mode 100644 testing/tests/binding/1101-PROPFIND-normal.test create mode 100644 testing/tests/binding/1102-PROPFIND-bound.result create mode 100644 testing/tests/binding/1102-PROPFIND-bound.test diff --git a/testing/tests/binding/1100-BIND.result b/testing/tests/binding/1100-BIND.result new file mode 100644 index 00000000..6750ffd5 --- /dev/null +++ b/testing/tests/binding/1100-BIND.result @@ -0,0 +1,44 @@ +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/boundbase/ +Content-Length: 0 +Content-Type: text/plain; charset="utf-8" + + + bind_id: >1434< + bound_source_id: >11< + dav_displayname: >Updated Displayname with PROPPATCH< + dav_name: >/user4/user2/< + length: >8< + parent_container: >/user4/< + + 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/< + + bind_id: >1440< + bound_source_id: >11< + dav_displayname: >User 2's Calendar, as uploaded by Admin< + dav_name: >/user4/base/user2/< + length: >8< + parent_container: >/user4/base/< + + bind_id: >1454< + bound_source_id: >1437< + dav_displayname: >A normal collection< + dav_name: >/user4/boundbase/< + length: >NULL< + parent_container: >/user4/< + diff --git a/testing/tests/binding/1100-BIND.test b/testing/tests/binding/1100-BIND.test new file mode 100644 index 00000000..851ce879 --- /dev/null +++ b/testing/tests/binding/1100-BIND.test @@ -0,0 +1,39 @@ +# +# Here we are binding against a collection containing further +# bindings, at the same level in the same collection. +# +# Before: +# /user4/base a collection containing two bindings and a collection +# +# After: +# /user4/boundbase is bound to /user4/base, so it should also appear +# to contain two bindings and a collection +# +TYPE=BIND +URL=http://regression.host/caldav.php/user4/ +AUTH=user4:user4 + +HEADER=User-Agent: Ticket Spec Tests +HEADER=Content-Type: text/xml; charset="UTF-8" +HEAD + + +BEGINDATA + + + boundbase + /caldav.php/user4/base + +ENDDATA + +QUERY +SELECT bind_id, + bound_source_id, + length(access_ticket_id), + parent_container, + dav_name, + dav_displayname + FROM dav_binding + ORDER BY bind_id +ENDQUERY + diff --git a/testing/tests/binding/1101-PROPFIND-normal.result b/testing/tests/binding/1101-PROPFIND-normal.result new file mode 100644 index 00000000..d719614e --- /dev/null +++ b/testing/tests/binding/1101-PROPFIND-normal.result @@ -0,0 +1,131 @@ + + + + /caldav.php/user4/base/ + + + A normal collection + + /caldav.php/.resources/1437 + + + + /caldav.php + user4 + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/base/user1/ + + + User 1's Calendaranza + + /caldav.php/.resources/10 + + + + /caldav.php + user4 + + + /caldav.php/user4 + base + + + /caldav.php + user1 + + + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/base/user2/ + + + User 2's Calendar, as uploaded by Admin + + /caldav.php/.resources/11 + + + + /caldav.php + user4 + + + /caldav.php/user4 + base + + + /caldav.php + user2 + + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/base/calendar/ + + + A sub collection + + /caldav.php/.resources/1438 + + + + /caldav.php/user4 + base + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/base/newcalendar/ + + + newcalendar + + /caldav.php/.resources/1443 + + + + /caldav.php/user4 + base + + + + + + + + HTTP/1.1 200 OK + + + diff --git a/testing/tests/binding/1101-PROPFIND-normal.test b/testing/tests/binding/1101-PROPFIND-normal.test new file mode 100644 index 00000000..6babcbc0 --- /dev/null +++ b/testing/tests/binding/1101-PROPFIND-normal.test @@ -0,0 +1,27 @@ +# +# PROPFIND on a real collection in which we have binds & collections +# +# In this case we're doing Depth: 0 +# +TYPE=PROPFIND +URL=http://regression.host/caldav.php/user4/base/ +AUTH=user4:user4 + +HEADER=User-Agent: BIND Spec Tests +HEADER=Content-Type: text/xml; charset="UTF-8" +HEADER=Depth: 1 + + +BEGINDATA + + + + + + + + + +ENDDATA + +# diff --git a/testing/tests/binding/1102-PROPFIND-bound.result b/testing/tests/binding/1102-PROPFIND-bound.result new file mode 100644 index 00000000..851a7142 --- /dev/null +++ b/testing/tests/binding/1102-PROPFIND-bound.result @@ -0,0 +1,148 @@ + + + + /caldav.php/user4/boundbase/ + + + A normal collection + + /caldav.php/.resources/1437 + + + + /caldav.php + user4 + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/boundbase/user1/ + + + User 1's Calendaranza + + /caldav.php/.resources/10 + + + + /caldav.php + user4 + + + /caldav.php/user4 + base + + + /caldav.php + user1 + + + /caldav.php/user4 + boundbase + + + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/boundbase/user2/ + + + User 2's Calendar, as uploaded by Admin + + /caldav.php/.resources/11 + + + + /caldav.php + user4 + + + /caldav.php/user4 + base + + + /caldav.php + user2 + + + /caldav.php/user4 + boundbase + + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/boundbase/calendar/ + + + A sub collection + + /caldav.php/.resources/1438 + + + + /caldav.php/user4 + base + + + /caldav.php/user4 + boundbase + + + + + + + + HTTP/1.1 200 OK + + + + /caldav.php/user4/boundbase/newcalendar/ + + + newcalendar + + /caldav.php/.resources/1443 + + + + /caldav.php/user4 + base + + + /caldav.php/user4 + boundbase + + + + + + + + HTTP/1.1 200 OK + + + diff --git a/testing/tests/binding/1102-PROPFIND-bound.test b/testing/tests/binding/1102-PROPFIND-bound.test new file mode 100644 index 00000000..6dab35f0 --- /dev/null +++ b/testing/tests/binding/1102-PROPFIND-bound.test @@ -0,0 +1,27 @@ +# +# PROPFIND on a collection in which we have binds & collections +# +# In this case we're doing Depth: 0 +# +TYPE=PROPFIND +URL=http://regression.host/caldav.php/user4/boundbase/ +AUTH=user4:user4 + +HEADER=User-Agent: BIND Spec Tests +HEADER=Content-Type: text/xml; charset="UTF-8" +HEADER=Depth: 1 + + +BEGINDATA + + + + + + + + + +ENDDATA + +#