1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/templates/event-cancel-person.txt Wed May 20 18:42:49 2015 +0200
1.3 @@ -0,0 +1,38 @@
1.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
1.5 +MIME-Version: 1.0
1.6 +From: paul.boddie@example.com
1.7 +To: vincent.vole@example.com
1.8 +Subject: Cancellation!
1.9 +
1.10 +Cancel the event for vincent.vole and paul.boddie. The free/busy details for
1.11 +the recipients should be updated, even those employing the person handler.
1.12 +
1.13 +--===============0047278175==
1.14 +Content-Type: text/plain; charset="us-ascii"
1.15 +MIME-Version: 1.0
1.16 +Content-Transfer-Encoding: 7bit
1.17 +
1.18 +This message contains an event.
1.19 +--===============0047278175==
1.20 +MIME-Version: 1.0
1.21 +Content-Transfer-Encoding: 7bit
1.22 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
1.23 +
1.24 +BEGIN:VCALENDAR
1.25 +PRODID:-//imip-agent/test//EN
1.26 +METHOD:CANCEL
1.27 +VERSION:2.0
1.28 +BEGIN:VEVENT
1.29 +ORGANIZER:mailto:paul.boddie@example.com
1.30 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
1.31 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
1.32 +DTSTAMP:20141125T004600Z
1.33 +DTSTART;TZID=Europe/Oslo:20141126T160000
1.34 +DTEND;TZID=Europe/Oslo:20141126T170000
1.35 +SUMMARY:Meeting at 4pm
1.36 +UID:event6@example.com
1.37 +SEQUENCE:2
1.38 +END:VEVENT
1.39 +END:VCALENDAR
1.40 +
1.41 +--===============0047278175==--
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/templates/event-request-person.txt Wed May 20 18:42:49 2015 +0200
2.3 @@ -0,0 +1,36 @@
2.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
2.5 +MIME-Version: 1.0
2.6 +From: paul.boddie@example.com
2.7 +To: vincent.vole@example.com
2.8 +Subject: Invitation!
2.9 +
2.10 +Test invitation of people, checking their status afterwards.
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="REQUEST"
2.22 +
2.23 +BEGIN:VCALENDAR
2.24 +PRODID:-//imip-agent/test//EN
2.25 +METHOD:REQUEST
2.26 +VERSION:2.0
2.27 +BEGIN:VEVENT
2.28 +ORGANIZER:mailto:paul.boddie@example.com
2.29 +ATTENDEE;ROLE=CHAIR:mailto:paul.boddie@example.com
2.30 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
2.31 +DTSTAMP:20141125T004600Z
2.32 +DTSTART;TZID=Europe/Oslo:20141126T160000
2.33 +DTEND;TZID=Europe/Oslo:20141126T170000
2.34 +SUMMARY:Meeting at 4pm
2.35 +UID:event6@example.com
2.36 +END:VEVENT
2.37 +END:VCALENDAR
2.38 +
2.39 +--===============0047278175==--
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/templates/fb-request-person-all.txt Wed May 20 18:42:49 2015 +0200
3.3 @@ -0,0 +1,29 @@
3.4 +Content-Type: multipart/alternative; boundary="===============0945993647=="
3.5 +MIME-Version: 1.0
3.6 +From: paul.boddie@example.com
3.7 +To: vincent.vole@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:vincent.vole@example.com
3.27 +DTSTAMP:20141125T164400Z
3.28 +UID:fb5@example.com
3.29 +END:VFREEBUSY
3.30 +END:VCALENDAR
3.31 +
3.32 +--===============0945993647==--
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/tests/templates/fb-request-person.txt Wed May 20 18:42:49 2015 +0200
4.3 @@ -0,0 +1,31 @@
4.4 +Content-Type: multipart/alternative; boundary="===============0945993647=="
4.5 +MIME-Version: 1.0
4.6 +From: paul.boddie@example.com
4.7 +To: vincent.vole@example.com
4.8 +
4.9 +--===============0945993647==
4.10 +Content-Type: text/plain; charset="us-ascii"
4.11 +MIME-Version: 1.0
4.12 +Content-Transfer-Encoding: 7bit
4.13 +
4.14 +This message contains a free/busy request.
4.15 +--===============0945993647==
4.16 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
4.17 +MIME-Version: 1.0
4.18 +Content-Transfer-Encoding: 7bit
4.19 +
4.20 +BEGIN:VCALENDAR
4.21 +PRODID:-//imip-agent/test//EN
4.22 +METHOD:REQUEST
4.23 +VERSION:2.0
4.24 +BEGIN:VFREEBUSY
4.25 +ORGANIZER:mailto:paul.boddie@example.com
4.26 +ATTENDEE:mailto:vincent.vole@example.com
4.27 +DTSTAMP:20141125T164400Z
4.28 +DTSTART:20141126T150000Z
4.29 +DTEND:20141126T180000Z
4.30 +UID:fb4@example.com
4.31 +END:VFREEBUSY
4.32 +END:VCALENDAR
4.33 +
4.34 +--===============0945993647==--
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/tests/test_accept.py Wed May 20 18:42:49 2015 +0200
5.3 @@ -0,0 +1,101 @@
5.4 +#!/usr/bin/env python
5.5 +
5.6 +"""
5.7 +A handler to help with testing.
5.8 +
5.9 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
5.10 +
5.11 +This program is free software; you can redistribute it and/or modify it under
5.12 +the terms of the GNU General Public License as published by the Free Software
5.13 +Foundation; either version 3 of the License, or (at your option) any later
5.14 +version.
5.15 +
5.16 +This program is distributed in the hope that it will be useful, but WITHOUT
5.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
5.19 +details.
5.20 +
5.21 +You should have received a copy of the GNU General Public License along with
5.22 +this program. If not, see <http://www.gnu.org/licenses/>.
5.23 +"""
5.24 +
5.25 +from imiptools.client import Client
5.26 +from imiptools.data import Object, get_address
5.27 +from imiptools.handlers import Handler
5.28 +from imiptools.mail import Messenger
5.29 +import imip_store
5.30 +import sys
5.31 +
5.32 +class TestHandler(Handler):
5.33 +
5.34 + """
5.35 + A content handler for use in testing, as opposed to operating within the
5.36 + mail processing pipeline.
5.37 + """
5.38 +
5.39 + def __init__(self, obj, user, messenger):
5.40 + Handler.__init__(self, messenger=messenger)
5.41 + Client.__init__(self, user) # this redefines the Handler initialisation
5.42 +
5.43 + self.set_object(obj)
5.44 +
5.45 + # Action methods.
5.46 +
5.47 + def accept_request(self):
5.48 +
5.49 + """
5.50 + Process the current request for the current user. Return whether any
5.51 + action was taken.
5.52 + """
5.53 +
5.54 + # Reply only on behalf of this user.
5.55 +
5.56 + attendee_attr = self.update_participation(self.obj, "ACCEPTED")
5.57 +
5.58 + if not attendee_attr:
5.59 + return None
5.60 +
5.61 + # NOTE: This is a simpler form of the code in imipweb.handler.
5.62 +
5.63 + organiser = get_address(self.obj.get_value("ORGANIZER"))
5.64 +
5.65 + self.obj["ATTENDEE"] = [(self.user, attendee_attr)]
5.66 + self.update_dtstamp()
5.67 + self.set_sequence(False)
5.68 +
5.69 + message = self.messenger.make_outgoing_message(
5.70 + [self.obj.to_part("REPLY")],
5.71 + [organiser],
5.72 + outgoing_bcc=get_address(self.user)
5.73 + )
5.74 +
5.75 + return message.as_string()
5.76 +
5.77 +# A simple main program that attempts to accept a stored request, writing the
5.78 +# response message to standard output.
5.79 +
5.80 +if __name__ == "__main__":
5.81 + try:
5.82 + store_dir, user, uid, recurrenceid = (sys.argv[1:5] + [None])[:4]
5.83 + except ValueError:
5.84 + print >>sys.stderr, "Need a store directory, user URI, event UID and optional RECURRENCE-ID."
5.85 + sys.exit(1)
5.86 +
5.87 + store = imip_store.FileStore(store_dir)
5.88 + fragment = store.get_event(user, uid, recurrenceid)
5.89 +
5.90 + if not fragment:
5.91 + print >>sys.stderr, "No such event:", uid, recurrenceid
5.92 + sys.exit(1)
5.93 +
5.94 + obj = Object(fragment)
5.95 + handler = TestHandler(obj, user, Messenger())
5.96 + response = handler.accept_request()
5.97 +
5.98 + if response:
5.99 + store.dequeue_request(user, uid, recurrenceid)
5.100 + print response
5.101 + else:
5.102 + sys.exit(1)
5.103 +
5.104 +# vim: tabstop=4 expandtab shiftwidth=4
6.1 --- a/tests/test_multiple_invitation.sh Wed May 20 18:39:06 2015 +0200
6.2 +++ b/tests/test_multiple_invitation.sh Wed May 20 18:42:49 2015 +0200
6.3 @@ -2,9 +2,9 @@
6.4
6.5 THIS_DIR=`dirname $0`
6.6
6.7 -TEMPLATES=$THIS_DIR/templates
6.8 -RESOURCE_SCRIPT=$THIS_DIR/../imip_resource.py
6.9 -SHOWMAIL=$THIS_DIR/../tools/showmail.py
6.10 +TEMPLATES="$THIS_DIR/templates"
6.11 +RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py"
6.12 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
6.13 STORE=/tmp/store
6.14 STATIC=/tmp/static
6.15 ARGS="-S $STORE -P $STATIC -d"
6.16 @@ -12,8 +12,8 @@
6.17 rm -r $STORE
6.18 rm -r $STATIC
6.19
6.20 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
6.21 -| $SHOWMAIL \
6.22 + "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
6.23 +| "$SHOWMAIL" \
6.24 > out0.tmp
6.25
6.26 grep -q 'METHOD:REPLY' out0.tmp \
6.27 @@ -21,8 +21,8 @@
6.28 && echo "Success" \
6.29 || echo "Failed"
6.30
6.31 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
6.32 -| $SHOWMAIL \
6.33 + "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
6.34 +| "$SHOWMAIL" \
6.35 > out1.tmp
6.36
6.37 grep -q 'METHOD:REPLY' out1.tmp \
6.38 @@ -30,8 +30,8 @@
6.39 && echo "Success" \
6.40 || echo "Failed"
6.41
6.42 - $RESOURCE_SCRIPT $ARGS -o 'resource-room-confroom@example.com' < $TEMPLATES/event-request-multiple.txt 2> /dev/null \
6.43 -| $SHOWMAIL \
6.44 + "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/event-request-multiple.txt" 2> /dev/null \
6.45 +| "$SHOWMAIL" \
6.46 > out2.tmp
6.47
6.48 grep -q 'METHOD:REPLY' out2.tmp \
6.49 @@ -39,8 +39,8 @@
6.50 && echo "Success" \
6.51 || echo "Failed"
6.52
6.53 - $RESOURCE_SCRIPT $ARGS -o 'resource-car-porsche911@example.com' < $TEMPLATES/event-request-multiple.txt 2> /dev/null \
6.54 -| $SHOWMAIL \
6.55 + "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/event-request-multiple.txt" 2> /dev/null \
6.56 +| "$SHOWMAIL" \
6.57 > out3.tmp
6.58
6.59 grep -q 'METHOD:REPLY' out3.tmp \
6.60 @@ -48,8 +48,8 @@
6.61 && echo "Success" \
6.62 || echo "Failed"
6.63
6.64 - $RESOURCE_SCRIPT $ARGS -o 'resource-room-confroom@example.com' < $TEMPLATES/fb-request.txt 2> /dev/null \
6.65 -| $SHOWMAIL \
6.66 + "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2> /dev/null \
6.67 +| "$SHOWMAIL" \
6.68 > out4.tmp
6.69
6.70 grep -q 'METHOD:REPLY' out4.tmp \
6.71 @@ -57,8 +57,8 @@
6.72 && echo "Success" \
6.73 || echo "Failed"
6.74
6.75 - $RESOURCE_SCRIPT $ARGS -o 'resource-car-porsche911@example.com' < $TEMPLATES/fb-request-car.txt 2> /dev/null \
6.76 -| $SHOWMAIL \
6.77 + "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2> /dev/null \
6.78 +| "$SHOWMAIL" \
6.79 > out5.tmp
6.80
6.81 grep -q 'METHOD:REPLY' out5.tmp \
6.82 @@ -66,11 +66,11 @@
6.83 && echo "Success" \
6.84 || echo "Failed"
6.85
6.86 -$RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel-multiple-attendee.txt 2> /dev/null
6.87 +"$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-multiple-attendee.txt" 2> /dev/null
6.88 echo "Cancel..."
6.89
6.90 - $RESOURCE_SCRIPT $ARGS -o 'resource-room-confroom@example.com' < $TEMPLATES/fb-request.txt 2> /dev/null \
6.91 -| $SHOWMAIL \
6.92 + "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2> /dev/null \
6.93 +| "$SHOWMAIL" \
6.94 > out6.tmp
6.95
6.96 grep -q 'METHOD:REPLY' out6.tmp \
6.97 @@ -78,8 +78,8 @@
6.98 && echo "Success" \
6.99 || echo "Failed"
6.100
6.101 - $RESOURCE_SCRIPT $ARGS -o 'resource-car-porsche911@example.com' < $TEMPLATES/fb-request-car.txt 2> /dev/null \
6.102 -| $SHOWMAIL \
6.103 + "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2> /dev/null \
6.104 +| "$SHOWMAIL" \
6.105 > out7.tmp
6.106
6.107 grep -q 'METHOD:REPLY' out7.tmp \
7.1 --- a/tests/test_outgoing_invitation.sh Wed May 20 18:39:06 2015 +0200
7.2 +++ b/tests/test_outgoing_invitation.sh Wed May 20 18:42:49 2015 +0200
7.3 @@ -2,9 +2,9 @@
7.4
7.5 THIS_DIR=`dirname $0`
7.6
7.7 -TEMPLATES=$THIS_DIR/templates
7.8 -OUTGOING_SCRIPT=$THIS_DIR/../imip_person_outgoing.py
7.9 -SHOWMAIL=$THIS_DIR/../tools/showmail.py
7.10 +TEMPLATES="$THIS_DIR/templates"
7.11 +OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py"
7.12 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
7.13 STORE=/tmp/store
7.14 STATIC=/tmp/static
7.15 ARGS="-S $STORE -P $STATIC -d"
7.16 @@ -15,14 +15,14 @@
7.17 rm -r $STORE
7.18 rm -r $STATIC
7.19
7.20 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request.txt 2> /dev/null
7.21 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2> /dev/null
7.22 cp "$FBFILE" out1.tmp
7.23
7.24 grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \
7.25 && echo "Success" \
7.26 || echo "Failed"
7.27
7.28 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-cancel.txt 2> /dev/null
7.29 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2> /dev/null
7.30 echo "Cancel..."
7.31 cp "$FBFILE" out2.tmp
7.32
7.33 @@ -30,7 +30,7 @@
7.34 && echo "Success" \
7.35 || echo "Failed"
7.36
7.37 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request-recurring.txt 2> /dev/null
7.38 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2> /dev/null
7.39 cp "$FBFILE" out3.tmp
7.40
7.41 [ `cat "$FBFILE" | wc -l` = '3' ] \
7.42 @@ -38,7 +38,7 @@
7.43 && echo "Success" \
7.44 || echo "Failed"
7.45
7.46 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring-instance.txt 2> /dev/null
7.47 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-instance.txt" 2> /dev/null
7.48 cp "$FBFILE" out4.tmp
7.49
7.50 [ `cat "$FBFILE" | wc -l` = '2' ] \
7.51 @@ -46,7 +46,7 @@
7.52 && echo "Success" \
7.53 || echo "Failed"
7.54
7.55 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request-recurring-reschedule-instance.txt 2> /dev/null
7.56 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-reschedule-instance.txt" 2> /dev/null
7.57 cp "$FBFILE" out5.tmp
7.58
7.59 grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBFILE" \
7.60 @@ -54,14 +54,14 @@
7.61 && echo "Success" \
7.62 || echo "Failed"
7.63
7.64 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring.txt 2> /dev/null
7.65 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2> /dev/null
7.66 cp "$FBFILE" out6.tmp
7.67
7.68 ! grep -q '^2' "$FBFILE" \
7.69 && echo "Success" \
7.70 || echo "Failed"
7.71
7.72 -$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request-recurring-day.txt 2> /dev/null
7.73 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2> /dev/null
7.74 cp "$FBFILE" out7.tmp
7.75
7.76 [ `cat "$FBFILE" | wc -l` = '3' ] \
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/tests/test_person_invitation.sh Wed May 20 18:42:49 2015 +0200
8.3 @@ -0,0 +1,68 @@
8.4 +#!/bin/sh
8.5 +
8.6 +THIS_DIR=`dirname $0`
8.7 +
8.8 +TEMPLATES="$THIS_DIR/templates"
8.9 +PERSON_SCRIPT="$THIS_DIR/../imip_person.py"
8.10 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
8.11 +STORE=/tmp/store
8.12 +STATIC=/tmp/static
8.13 +ARGS="-S $STORE -P $STATIC -d"
8.14 +USER="mailto:vincent.vole@example.com"
8.15 +SENDER="mailto:paul.boddie@example.com"
8.16 +FBFILE="$STORE/$USER/freebusy"
8.17 +FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER"
8.18 +TAB=`printf '\t'`
8.19 +
8.20 +OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py"
8.21 +
8.22 +PYTHONPATH="$THIS_DIR/.."
8.23 +export PYTHONPATH
8.24 +
8.25 +ACCEPT_SCRIPT="$THIS_DIR/test_accept.py"
8.26 +ACCEPT_ARGS="$STORE"
8.27 +
8.28 +rm -r $STORE
8.29 +rm -r $STATIC
8.30 +
8.31 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-request-person-all.txt" 2> /dev/null \
8.32 +| "$SHOWMAIL" \
8.33 +> out0.tmp
8.34 +
8.35 + grep -q 'METHOD:REPLY' out0.tmp \
8.36 +&& ! grep -q '^FREEBUSY' out0.tmp \
8.37 +&& echo "Success" \
8.38 +|| echo "Failed"
8.39 +
8.40 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-request-person.txt" 2> /dev/null \
8.41 +| "$SHOWMAIL" \
8.42 +> out1.tmp
8.43 +
8.44 + grep -q 'METHOD:REPLY' out1.tmp \
8.45 +&& ! grep -q '^FREEBUSY' out1.tmp \
8.46 +&& echo "Success" \
8.47 +|| echo "Failed"
8.48 +
8.49 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person.txt" 2> /dev/null \
8.50 +| "$SHOWMAIL" \
8.51 +> out2.tmp
8.52 +
8.53 + ! grep -q 'METHOD:REPLY' out2.tmp \
8.54 +&& echo "Success" \
8.55 +|| echo "Failed"
8.56 +
8.57 + ! grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \
8.58 +&& echo "Success" \
8.59 +|| echo "Failed"
8.60 +
8.61 + grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBOTHERFILE" \
8.62 +&& echo "Success" \
8.63 +|| echo "Failed"
8.64 +
8.65 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "event6@example.com" \
8.66 +| tee out3.tmp \
8.67 +| "$OUTGOING_SCRIPT" $ARGS
8.68 +
8.69 + grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \
8.70 +&& echo "Success" \
8.71 +|| echo "Failed"
9.1 --- a/tests/test_resource_invitation.sh Wed May 20 18:39:06 2015 +0200
9.2 +++ b/tests/test_resource_invitation.sh Wed May 20 18:42:49 2015 +0200
9.3 @@ -2,9 +2,9 @@
9.4
9.5 THIS_DIR=`dirname $0`
9.6
9.7 -TEMPLATES=$THIS_DIR/templates
9.8 -RESOURCE_SCRIPT=$THIS_DIR/../imip_resource.py
9.9 -SHOWMAIL=$THIS_DIR/../tools/showmail.py
9.10 +TEMPLATES="$THIS_DIR/templates"
9.11 +RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py"
9.12 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
9.13 STORE=/tmp/store
9.14 STATIC=/tmp/static
9.15 ARGS="-S $STORE -P $STATIC -d"
9.16 @@ -12,8 +12,8 @@
9.17 rm -r $STORE
9.18 rm -r $STATIC
9.19
9.20 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
9.21 -| $SHOWMAIL \
9.22 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
9.23 +| "$SHOWMAIL" \
9.24 > out0.tmp
9.25
9.26 grep -q 'METHOD:REPLY' out0.tmp \
9.27 @@ -21,8 +21,8 @@
9.28 && echo "Success" \
9.29 || echo "Failed"
9.30
9.31 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
9.32 -| $SHOWMAIL \
9.33 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2> /dev/null \
9.34 +| "$SHOWMAIL" \
9.35 > out1.tmp
9.36
9.37 grep -q 'METHOD:REPLY' out1.tmp \
9.38 @@ -30,8 +30,8 @@
9.39 && echo "Success" \
9.40 || echo "Failed"
9.41
9.42 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request.txt 2> /dev/null \
9.43 -| $SHOWMAIL \
9.44 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2> /dev/null \
9.45 +| "$SHOWMAIL" \
9.46 > out2.tmp
9.47
9.48 grep -q 'METHOD:REPLY' out2.tmp \
9.49 @@ -39,8 +39,8 @@
9.50 && echo "Success" \
9.51 || echo "Failed"
9.52
9.53 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
9.54 -| $SHOWMAIL \
9.55 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2> /dev/null \
9.56 +| "$SHOWMAIL" \
9.57 > out3.tmp
9.58
9.59 grep -q 'METHOD:REPLY' out3.tmp \
9.60 @@ -48,8 +48,8 @@
9.61 && echo "Success" \
9.62 || echo "Failed"
9.63
9.64 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-conflict.txt 2> /dev/null \
9.65 -| $SHOWMAIL \
9.66 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-conflict.txt" 2> /dev/null \
9.67 +| "$SHOWMAIL" \
9.68 > out4.tmp
9.69
9.70 grep -q 'METHOD:REPLY' out4.tmp \
9.71 @@ -57,8 +57,8 @@
9.72 && echo "Success" \
9.73 || echo "Failed"
9.74
9.75 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
9.76 -| $SHOWMAIL \
9.77 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2> /dev/null \
9.78 +| "$SHOWMAIL" \
9.79 > out5.tmp
9.80
9.81 grep -q 'METHOD:REPLY' out5.tmp \
9.82 @@ -67,11 +67,11 @@
9.83 && echo "Success" \
9.84 || echo "Failed"
9.85
9.86 -$RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel.txt 2> /dev/null
9.87 +"$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2> /dev/null
9.88 echo "Cancel..."
9.89
9.90 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
9.91 -| $SHOWMAIL \
9.92 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2> /dev/null \
9.93 +| "$SHOWMAIL" \
9.94 > out6.tmp
9.95
9.96 grep -q 'METHOD:REPLY' out6.tmp \
9.97 @@ -79,11 +79,11 @@
9.98 && echo "Success" \
9.99 || echo "Failed"
9.100
9.101 -$RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-spoofed.txt 2> /dev/null
9.102 +"$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-spoofed.txt" 2> /dev/null
9.103 echo "Spoof..."
9.104
9.105 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
9.106 -| $SHOWMAIL \
9.107 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
9.108 +| "$SHOWMAIL" \
9.109 > out7.tmp
9.110
9.111 grep -q 'METHOD:REPLY' out7.tmp \
10.1 --- a/tests/test_resource_invitation_recurring.sh Wed May 20 18:39:06 2015 +0200
10.2 +++ b/tests/test_resource_invitation_recurring.sh Wed May 20 18:42:49 2015 +0200
10.3 @@ -2,9 +2,9 @@
10.4
10.5 THIS_DIR=`dirname $0`
10.6
10.7 -TEMPLATES=$THIS_DIR/templates
10.8 -RESOURCE_SCRIPT=$THIS_DIR/../imip_resource.py
10.9 -SHOWMAIL=$THIS_DIR/../tools/showmail.py
10.10 +TEMPLATES="$THIS_DIR/templates"
10.11 +RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py"
10.12 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
10.13 STORE=/tmp/store
10.14 STATIC=/tmp/static
10.15 ARGS="-S $STORE -P $STATIC -d"
10.16 @@ -12,8 +12,8 @@
10.17 rm -r $STORE
10.18 rm -r $STATIC
10.19
10.20 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
10.21 -| $SHOWMAIL \
10.22 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
10.23 +| "$SHOWMAIL" \
10.24 > out0.tmp
10.25
10.26 grep -q 'METHOD:REPLY' out0.tmp \
10.27 @@ -21,8 +21,8 @@
10.28 && echo "Success" \
10.29 || echo "Failed"
10.30
10.31 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-recurring.txt 2> /dev/null \
10.32 -| $SHOWMAIL \
10.33 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2> /dev/null \
10.34 +| "$SHOWMAIL" \
10.35 > out2.tmp
10.36
10.37 grep -q 'METHOD:REPLY' out2.tmp \
10.38 @@ -30,8 +30,8 @@
10.39 && echo "Success" \
10.40 || echo "Failed"
10.41
10.42 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
10.43 -| $SHOWMAIL \
10.44 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
10.45 +| "$SHOWMAIL" \
10.46 > out3.tmp
10.47
10.48 grep -q 'METHOD:REPLY' out3.tmp \
10.49 @@ -40,11 +40,11 @@
10.50 && echo "Success" \
10.51 || echo "Failed"
10.52
10.53 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring-instance.txt 2> /dev/null
10.54 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-instance.txt" 2> /dev/null
10.55 echo "Cancel..."
10.56
10.57 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
10.58 -| $SHOWMAIL \
10.59 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
10.60 +| "$SHOWMAIL" \
10.61 > out4.tmp
10.62
10.63 grep -q 'METHOD:REPLY' out4.tmp \
10.64 @@ -53,8 +53,8 @@
10.65 && echo "Success" \
10.66 || echo "Failed"
10.67
10.68 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-recurring-reschedule-instance.txt 2> /dev/null \
10.69 -| $SHOWMAIL \
10.70 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-reschedule-instance.txt" 2> /dev/null \
10.71 +| "$SHOWMAIL" \
10.72 > out5.tmp
10.73
10.74 grep -q 'METHOD:REPLY' out5.tmp \
10.75 @@ -62,8 +62,8 @@
10.76 && echo "Success" \
10.77 || echo "Failed"
10.78
10.79 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
10.80 -| $SHOWMAIL \
10.81 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
10.82 +| "$SHOWMAIL" \
10.83 > out6.tmp
10.84
10.85 grep -q 'METHOD:REPLY' out6.tmp \
10.86 @@ -72,11 +72,11 @@
10.87 && echo "Success" \
10.88 || echo "Failed"
10.89
10.90 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring.txt 2> /dev/null
10.91 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2> /dev/null
10.92 echo "Cancel..."
10.93
10.94 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
10.95 -| $SHOWMAIL \
10.96 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
10.97 +| "$SHOWMAIL" \
10.98 > out7.tmp
10.99
10.100 grep -q 'METHOD:REPLY' out7.tmp \
11.1 --- a/tests/test_resource_invitation_recurring_day.sh Wed May 20 18:39:06 2015 +0200
11.2 +++ b/tests/test_resource_invitation_recurring_day.sh Wed May 20 18:42:49 2015 +0200
11.3 @@ -2,9 +2,9 @@
11.4
11.5 THIS_DIR=`dirname $0`
11.6
11.7 -TEMPLATES=$THIS_DIR/templates
11.8 -RESOURCE_SCRIPT=$THIS_DIR/../imip_resource.py
11.9 -SHOWMAIL=$THIS_DIR/../tools/showmail.py
11.10 +TEMPLATES="$THIS_DIR/templates"
11.11 +RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py"
11.12 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
11.13 STORE=/tmp/store
11.14 STATIC=/tmp/static
11.15 ARGS="-S $STORE -P $STATIC -d"
11.16 @@ -12,8 +12,8 @@
11.17 rm -r $STORE
11.18 rm -r $STATIC
11.19
11.20 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
11.21 -| $SHOWMAIL \
11.22 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
11.23 +| "$SHOWMAIL" \
11.24 > out0.tmp
11.25
11.26 grep -q 'METHOD:REPLY' out0.tmp \
11.27 @@ -21,8 +21,8 @@
11.28 && echo "Success" \
11.29 || echo "Failed"
11.30
11.31 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-recurring-day.txt 2> /dev/null \
11.32 -| $SHOWMAIL \
11.33 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2> /dev/null \
11.34 +| "$SHOWMAIL" \
11.35 > out1.tmp
11.36
11.37 grep -q 'METHOD:REPLY' out1.tmp \
11.38 @@ -30,8 +30,8 @@
11.39 && echo "Success" \
11.40 || echo "Failed"
11.41
11.42 - $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
11.43 -| $SHOWMAIL \
11.44 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2> /dev/null \
11.45 +| "$SHOWMAIL" \
11.46 > out2.tmp
11.47
11.48 grep -q 'METHOD:REPLY' out2.tmp \