1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/templates/event-cancel-multiple-attendee.txt Tue May 19 16:39:34 2015 +0200
1.3 @@ -0,0 +1,33 @@
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: Invitation!
1.9 +
1.10 +--===============0047278175==
1.11 +Content-Type: text/plain; charset="us-ascii"
1.12 +MIME-Version: 1.0
1.13 +Content-Transfer-Encoding: 7bit
1.14 +
1.15 +This message contains an event.
1.16 +--===============0047278175==
1.17 +MIME-Version: 1.0
1.18 +Content-Transfer-Encoding: 7bit
1.19 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
1.20 +
1.21 +BEGIN:VCALENDAR
1.22 +PRODID:-//imip-agent/test//EN
1.23 +METHOD:CANCEL
1.24 +VERSION:2.0
1.25 +BEGIN:VEVENT
1.26 +ORGANIZER:mailto:paul.boddie@example.com
1.27 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
1.28 +DTSTAMP:20141125T004600Z
1.29 +DTSTART;TZID=Europe/Oslo:20141126T160000
1.30 +DTEND;TZID=Europe/Oslo:20141126T170000
1.31 +SUMMARY:Test drive
1.32 +UID:event5@example.com
1.33 +END:VEVENT
1.34 +END:VCALENDAR
1.35 +
1.36 +--===============0047278175==--
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/templates/event-request-multiple.txt Tue May 19 16:39:34 2015 +0200
2.3 @@ -0,0 +1,35 @@
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, resource-car-porsche911@example.com
2.8 +Subject: Invitation!
2.9 +
2.10 +--===============0047278175==
2.11 +Content-Type: text/plain; charset="us-ascii"
2.12 +MIME-Version: 1.0
2.13 +Content-Transfer-Encoding: 7bit
2.14 +
2.15 +This message contains an event.
2.16 +--===============0047278175==
2.17 +MIME-Version: 1.0
2.18 +Content-Transfer-Encoding: 7bit
2.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
2.20 +
2.21 +BEGIN:VCALENDAR
2.22 +PRODID:-//imip-agent/test//EN
2.23 +METHOD:REQUEST
2.24 +VERSION:2.0
2.25 +BEGIN:VEVENT
2.26 +ORGANIZER:mailto:paul.boddie@example.com
2.27 +ATTENDEE;ROLE=CHAIR:mailto:paul.boddie@example.com
2.28 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
2.29 +ATTENDEE;RSVP=TRUE:mailto:resource-car-porsche911@example.com
2.30 +DTSTAMP:20141125T004600Z
2.31 +DTSTART;TZID=Europe/Oslo:20141126T160000
2.32 +DTEND;TZID=Europe/Oslo:20141126T170000
2.33 +SUMMARY:Test drive
2.34 +UID:event5@example.com
2.35 +END:VEVENT
2.36 +END:VCALENDAR
2.37 +
2.38 +--===============0047278175==--
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/templates/fb-request-car.txt Tue May 19 16:39:34 2015 +0200
3.3 @@ -0,0 +1,31 @@
3.4 +Content-Type: multipart/alternative; boundary="===============0945993647=="
3.5 +MIME-Version: 1.0
3.6 +From: paul.boddie@example.com
3.7 +To: resource-car-porsche911@example.com
3.8 +
3.9 +--===============0945993647==
3.10 +Content-Type: text/plain; charset="us-ascii"
3.11 +MIME-Version: 1.0
3.12 +Content-Transfer-Encoding: 7bit
3.13 +
3.14 +This message contains a free/busy request.
3.15 +--===============0945993647==
3.16 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
3.17 +MIME-Version: 1.0
3.18 +Content-Transfer-Encoding: 7bit
3.19 +
3.20 +BEGIN:VCALENDAR
3.21 +PRODID:-//imip-agent/test//EN
3.22 +METHOD:REQUEST
3.23 +VERSION:2.0
3.24 +BEGIN:VFREEBUSY
3.25 +ORGANIZER:mailto:paul.boddie@example.com
3.26 +ATTENDEE:mailto:resource-car-porsche911@example.com
3.27 +DTSTAMP:20141125T164400Z
3.28 +DTSTART:20141126T150000Z
3.29 +DTEND:20141126T180000Z
3.30 +UID:fb1@example.com
3.31 +END:VFREEBUSY
3.32 +END:VCALENDAR
3.33 +
3.34 +--===============0945993647==--
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/tests/test_multiple_invitation.sh Tue May 19 16:39:34 2015 +0200
4.3 @@ -0,0 +1,88 @@
4.4 +#!/bin/sh
4.5 +
4.6 +THIS_DIR=`dirname $0`
4.7 +
4.8 +TEMPLATES=$THIS_DIR/templates
4.9 +RESOURCE_SCRIPT=$THIS_DIR/../imip_resource.py
4.10 +SHOWMAIL=$THIS_DIR/../tools/showmail.py
4.11 +STORE=/tmp/store
4.12 +STATIC=/tmp/static
4.13 +ARGS="-S $STORE -P $STATIC -d"
4.14 +
4.15 +rm -r $STORE
4.16 +rm -r $STATIC
4.17 +
4.18 + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
4.19 +| $SHOWMAIL \
4.20 +> out0.tmp
4.21 +
4.22 + grep -q 'METHOD:REPLY' out0.tmp \
4.23 +&& grep -q -v '^FREEBUSY' out0.tmp \
4.24 +&& echo "Success" \
4.25 +|| echo "Failed"
4.26 +
4.27 + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
4.28 +| $SHOWMAIL \
4.29 +> out1.tmp
4.30 +
4.31 + grep -q 'METHOD:REPLY' out1.tmp \
4.32 +&& grep -q -v '^FREEBUSY' out1.tmp \
4.33 +&& echo "Success" \
4.34 +|| echo "Failed"
4.35 +
4.36 + $RESOURCE_SCRIPT $ARGS -o 'resource-room-confroom@example.com' < $TEMPLATES/event-request-multiple.txt 2> /dev/null \
4.37 +| $SHOWMAIL \
4.38 +> out2.tmp
4.39 +
4.40 + grep -q 'METHOD:REPLY' out2.tmp \
4.41 +&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \
4.42 +&& echo "Success" \
4.43 +|| echo "Failed"
4.44 +
4.45 + $RESOURCE_SCRIPT $ARGS -o 'resource-car-porsche911@example.com' < $TEMPLATES/event-request-multiple.txt 2> /dev/null \
4.46 +| $SHOWMAIL \
4.47 +> out3.tmp
4.48 +
4.49 + grep -q 'METHOD:REPLY' out3.tmp \
4.50 +&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out3.tmp \
4.51 +&& echo "Success" \
4.52 +|| echo "Failed"
4.53 +
4.54 + $RESOURCE_SCRIPT $ARGS -o 'resource-room-confroom@example.com' < $TEMPLATES/fb-request.txt 2> /dev/null \
4.55 +| $SHOWMAIL \
4.56 +> out4.tmp
4.57 +
4.58 + grep -q 'METHOD:REPLY' out4.tmp \
4.59 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out4.tmp \
4.60 +&& echo "Success" \
4.61 +|| echo "Failed"
4.62 +
4.63 + $RESOURCE_SCRIPT $ARGS -o 'resource-car-porsche911@example.com' < $TEMPLATES/fb-request-car.txt 2> /dev/null \
4.64 +| $SHOWMAIL \
4.65 +> out5.tmp
4.66 +
4.67 + grep -q 'METHOD:REPLY' out5.tmp \
4.68 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out5.tmp \
4.69 +&& echo "Success" \
4.70 +|| echo "Failed"
4.71 +
4.72 +$RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel-multiple-attendee.txt 2> /dev/null
4.73 +echo "Cancel..."
4.74 +
4.75 + $RESOURCE_SCRIPT $ARGS -o 'resource-room-confroom@example.com' < $TEMPLATES/fb-request.txt 2> /dev/null \
4.76 +| $SHOWMAIL \
4.77 +> out6.tmp
4.78 +
4.79 + grep -q 'METHOD:REPLY' out6.tmp \
4.80 +&& grep -q -v 'FREEBUSY' out6.tmp \
4.81 +&& echo "Success" \
4.82 +|| echo "Failed"
4.83 +
4.84 + $RESOURCE_SCRIPT $ARGS -o 'resource-car-porsche911@example.com' < $TEMPLATES/fb-request-car.txt 2> /dev/null \
4.85 +| $SHOWMAIL \
4.86 +> out7.tmp
4.87 +
4.88 + grep -q 'METHOD:REPLY' out7.tmp \
4.89 +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out7.tmp \
4.90 +&& echo "Success" \
4.91 +|| echo "Failed"