Tests to try and tickle an issue raised in MR 86

However, the result is what it should be? Interesting.

https://gitlab.com/davical-project/davical/-/merge_requests/86
This commit is contained in:
Andrew Ruthven 2022-12-13 14:44:23 +13:00
parent 0ec4fb4dc5
commit 5ef5c756f8
6 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,8 @@
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, bind, addressbook, calendar-auto-schedule, calendar-proxy
ETag: "d0013fadaf8c7a44eff836556eb9a3cc"
Content-Length: 0
Content-Type: text/plain; charset="utf-8"

View File

@ -0,0 +1,43 @@
#
# Create an event that stradles a daylight savings (DST) change.
#
TYPE=PUT
URL=http://regression.host/caldav.php/user1/home/dst-change.ics
HEAD
HEADER=Content-Type: text/calendar
BEGINDATA
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
DTSTART:20070311T020000
TZNAME:PDT
TZOFFSETTO:-0700
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
DTSTART:20071104T020000
TZNAME:PST
TZOFFSETTO:-0800
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20220301T003348Z
TRANSP:OPAQUE
SUMMARY:Test timezone change
SEQUENCE:0
UID:dst-change
DTEND;TZID=America/Los_Angeles:20220312T213000
CREATED;TZID=America/Los_Angeles:20220228T163348
DESCRIPTION:
DTSTART;TZID=America/Los_Angeles:20220312T180000
END:VEVENT
END:VCALENDAR
ENDDATA

View File

@ -0,0 +1,35 @@
HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
ETag: "c3661c69e0e544a734ec8db9a3d773a2"
Content-Length: 622
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<response>
<href>/caldav.php/user1/home/dst-change.ics</href>
<propstat>
<prop>
<C:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20220301T003348Z
TRANSP:OPAQUE
SUMMARY:Test timezone change
SEQUENCE:0
UID:dst-change
CREATED;TZID=America/Los_Angeles:20220228T163348
DESCRIPTION:
DTSTART:20220313T020000Z
DURATION:PT3H30M
END:VEVENT
END:VCALENDAR
</C:calendar-data>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>

View File

@ -0,0 +1,27 @@
# Fetch an event that stradles a daylight savings (DST) change.
#
TYPE=REPORT
URL=http://regression.host/caldav.php/user1/home/
HEADER=Content-Type: text/calendar
HEADER=Content-Type: text/xml; charset="UTF-8"
HEAD
BEGINDATA
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:prop>
<C:calendar-data>
<C:expand start="20220312T080000Z" end="20220313T080000Z"/>
</C:calendar-data>
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:time-range start="20220312T080000Z" end="20220313T080000Z"/>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
ENDDATA

View File

@ -0,0 +1,5 @@
HTTP/1.1 204 No Content
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy

View File

@ -0,0 +1,8 @@
#
# Delete the event that stradles a daylight savings (DST) change.
#
TYPE=DELETE
URL=http://regression.host/caldav.php/user1/home/dst-change.ics
HEADER=Content-Type: text/calendar
HEAD