1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/templates/event-cancel-recurring-exdate-floating.txt Tue Aug 04 20:02:29 2015 +0200
1.3 @@ -0,0 +1,34 @@
1.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
1.5 +MIME-Version: 1.0
1.6 +From: paul.boddie@example.com
1.7 +To: resource-room-confroom@example.com
1.8 +Subject: Cancellation!
1.9 +
1.10 +Cancel the event for resource-room-confroom and paul.boddie.
1.11 +
1.12 +--===============0047278175==
1.13 +Content-Type: text/plain; charset="us-ascii"
1.14 +MIME-Version: 1.0
1.15 +Content-Transfer-Encoding: 7bit
1.16 +
1.17 +This message contains an event.
1.18 +--===============0047278175==
1.19 +MIME-Version: 1.0
1.20 +Content-Transfer-Encoding: 7bit
1.21 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
1.22 +
1.23 +BEGIN:VCALENDAR
1.24 +PRODID:-//imip-agent/test//EN
1.25 +METHOD:CANCEL
1.26 +VERSION:2.0
1.27 +BEGIN:VEVENT
1.28 +ORGANIZER:mailto:paul.boddie@example.com
1.29 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
1.30 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
1.31 +DTSTAMP:20141009T182400Z
1.32 +SUMMARY:Recurring event
1.33 +UID:event11@example.com
1.34 +END:VEVENT
1.35 +END:VCALENDAR
1.36 +
1.37 +--===============0047278175==--
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/templates/event-cancel-recurring-exdate.txt Tue Aug 04 20:02:29 2015 +0200
2.3 @@ -0,0 +1,34 @@
2.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
2.5 +MIME-Version: 1.0
2.6 +From: paul.boddie@example.com
2.7 +To: resource-room-confroom@example.com
2.8 +Subject: Cancellation!
2.9 +
2.10 +Cancel the event for resource-room-confroom and paul.boddie.
2.11 +
2.12 +--===============0047278175==
2.13 +Content-Type: text/plain; charset="us-ascii"
2.14 +MIME-Version: 1.0
2.15 +Content-Transfer-Encoding: 7bit
2.16 +
2.17 +This message contains an event.
2.18 +--===============0047278175==
2.19 +MIME-Version: 1.0
2.20 +Content-Transfer-Encoding: 7bit
2.21 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
2.22 +
2.23 +BEGIN:VCALENDAR
2.24 +PRODID:-//imip-agent/test//EN
2.25 +METHOD:CANCEL
2.26 +VERSION:2.0
2.27 +BEGIN:VEVENT
2.28 +ORGANIZER:mailto:paul.boddie@example.com
2.29 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
2.30 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
2.31 +DTSTAMP:20141009T182400Z
2.32 +SUMMARY:Recurring event
2.33 +UID:event10@example.com
2.34 +END:VEVENT
2.35 +END:VCALENDAR
2.36 +
2.37 +--===============0047278175==--
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/templates/event-request-recurring-exdate-floating.txt Tue Aug 04 20:02:29 2015 +0200
3.3 @@ -0,0 +1,35 @@
3.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
3.5 +MIME-Version: 1.0
3.6 +From: paul.boddie@example.com
3.7 +To: resource-room-confroom@example.com
3.8 +Subject: Invitation!
3.9 +
3.10 +--===============0047278175==
3.11 +Content-Type: text/plain; charset="us-ascii"
3.12 +MIME-Version: 1.0
3.13 +Content-Transfer-Encoding: 7bit
3.14 +
3.15 +This message contains an event.
3.16 +--===============0047278175==
3.17 +MIME-Version: 1.0
3.18 +Content-Transfer-Encoding: 7bit
3.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
3.20 +
3.21 +BEGIN:VCALENDAR
3.22 +PRODID:-//imip-agent/test//EN
3.23 +METHOD:REQUEST
3.24 +VERSION:2.0
3.25 +BEGIN:VEVENT
3.26 +ORGANIZER:mailto:paul.boddie@example.com
3.27 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
3.28 +DTSTAMP:20141009T182400Z
3.29 +DTSTART:20141010T100000
3.30 +DTEND:20141010T110000
3.31 +RRULE:FREQ=MONTHLY;BYDAY=2FR
3.32 +EXDATE;VALUE=DATE-TIME:20141212T100000
3.33 +SUMMARY:Recurring event with exception
3.34 +UID:event11@example.com
3.35 +END:VEVENT
3.36 +END:VCALENDAR
3.37 +
3.38 +--===============0047278175==--
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/tests/templates/event-request-recurring-exdate.txt Tue Aug 04 20:02:29 2015 +0200
4.3 @@ -0,0 +1,35 @@
4.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
4.5 +MIME-Version: 1.0
4.6 +From: paul.boddie@example.com
4.7 +To: resource-room-confroom@example.com
4.8 +Subject: Invitation!
4.9 +
4.10 +--===============0047278175==
4.11 +Content-Type: text/plain; charset="us-ascii"
4.12 +MIME-Version: 1.0
4.13 +Content-Transfer-Encoding: 7bit
4.14 +
4.15 +This message contains an event.
4.16 +--===============0047278175==
4.17 +MIME-Version: 1.0
4.18 +Content-Transfer-Encoding: 7bit
4.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
4.20 +
4.21 +BEGIN:VCALENDAR
4.22 +PRODID:-//imip-agent/test//EN
4.23 +METHOD:REQUEST
4.24 +VERSION:2.0
4.25 +BEGIN:VEVENT
4.26 +ORGANIZER:mailto:paul.boddie@example.com
4.27 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
4.28 +DTSTAMP:20141009T182400Z
4.29 +DTSTART;TZID=Europe/Oslo:20141010T100000
4.30 +DTEND;TZID=Europe/Oslo:20141010T110000
4.31 +RRULE:FREQ=MONTHLY;BYDAY=2FR
4.32 +EXDATE;VALUE=DATE-TIME;TZID=Europe/Oslo:20141212T100000
4.33 +SUMMARY:Recurring event with exception
4.34 +UID:event10@example.com
4.35 +END:VEVENT
4.36 +END:VCALENDAR
4.37 +
4.38 +--===============0047278175==--
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/tests/test_resource_invitation_recurring_timezones.sh Tue Aug 04 20:02:29 2015 +0200
5.3 @@ -0,0 +1,97 @@
5.4 +#!/bin/sh
5.5 +
5.6 +THIS_DIR=`dirname $0`
5.7 +
5.8 +TEMPLATES="$THIS_DIR/templates"
5.9 +RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py"
5.10 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
5.11 +STORE=/tmp/store
5.12 +STATIC=/tmp/static
5.13 +PREFS=/tmp/prefs
5.14 +ARGS="-S $STORE -P $STATIC -p $PREFS -d"
5.15 +USER="mailto:resource-room-confroom@example.com"
5.16 +ERROR=err.tmp
5.17 +
5.18 +rm -r $STORE
5.19 +rm -r $STATIC
5.20 +rm -r $PREFS
5.21 +rm $ERROR
5.22 +rm out*.tmp
5.23 +
5.24 +mkdir -p "$PREFS/$USER"
5.25 +echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
5.26 +echo 'share' > "$PREFS/$USER/freebusy_sharing"
5.27 +
5.28 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
5.29 +| "$SHOWMAIL" \
5.30 +> out0.tmp
5.31 +
5.32 + grep -q 'METHOD:REPLY' out0.tmp \
5.33 +&& ! grep -q '^FREEBUSY' out0.tmp \
5.34 +&& echo "Success" \
5.35 +|| echo "Failed"
5.36 +
5.37 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate.txt" 2>> $ERROR \
5.38 +| "$SHOWMAIL" \
5.39 +> out2.tmp
5.40 +
5.41 + grep -q 'METHOD:REPLY' out2.tmp \
5.42 +&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \
5.43 +&& echo "Success" \
5.44 +|| echo "Failed"
5.45 +
5.46 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
5.47 +| "$SHOWMAIL" \
5.48 +> out3.tmp
5.49 +
5.50 + grep -q 'METHOD:REPLY' out3.tmp \
5.51 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out3.tmp \
5.52 +&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out3.tmp \
5.53 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out3.tmp \
5.54 +&& echo "Success" \
5.55 +|| echo "Failed"
5.56 +
5.57 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate.txt" 2>> $ERROR
5.58 +echo "Cancel..."
5.59 +
5.60 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
5.61 +| "$SHOWMAIL" \
5.62 +> out4.tmp
5.63 +
5.64 + grep -q 'METHOD:REPLY' out4.tmp \
5.65 +&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out4.tmp \
5.66 +&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out4.tmp \
5.67 +&& echo "Success" \
5.68 +|| echo "Failed"
5.69 +
5.70 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate-floating.txt" 2>> $ERROR \
5.71 +| "$SHOWMAIL" \
5.72 +> out5.tmp
5.73 +
5.74 + grep -q 'METHOD:REPLY' out5.tmp \
5.75 +&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out5.tmp \
5.76 +&& echo "Success" \
5.77 +|| echo "Failed"
5.78 +
5.79 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
5.80 +| "$SHOWMAIL" \
5.81 +> out6.tmp
5.82 +
5.83 + grep -q 'METHOD:REPLY' out6.tmp \
5.84 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out6.tmp \
5.85 +&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out6.tmp \
5.86 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out6.tmp \
5.87 +&& echo "Success" \
5.88 +|| echo "Failed"
5.89 +
5.90 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate-floating.txt" 2>> $ERROR
5.91 +echo "Cancel..."
5.92 +
5.93 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
5.94 +| "$SHOWMAIL" \
5.95 +> out7.tmp
5.96 +
5.97 + grep -q 'METHOD:REPLY' out7.tmp \
5.98 +&& ! grep -q '^FREEBUSY' out7.tmp \
5.99 +&& echo "Success" \
5.100 +|| echo "Failed"