2015-10-17 | Paul Boddie | raw annotate files changeset graph | Consolidated descriptions of events for both REFRESH requests and for messages sent by the manager, bundling the necessary REQUEST and CANCEL payloads to describe events and their recurrences. Changed organiser-sent messages in the manager to be also sent to the user's own address, not the people-outgoing version of that address, adding support for self-sent CANCEL messages in the person handler. Added the removal of cancelled recurrences to restore periods in events edited in the manager. Otherwise, such periods can never be restored. Expanded the REFRESH method tests. |
1 #!/bin/sh 2 3 THIS_DIR=`dirname $0` 4 5 TEMPLATES="$THIS_DIR/templates" 6 RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" 7 SHOWMAIL="$THIS_DIR/../tools/showmail.py" 8 STORE=/tmp/store 9 STATIC=/tmp/static 10 PREFS=/tmp/prefs 11 ARGS="-S $STORE -P $STATIC -p $PREFS -d" 12 USER="mailto:resource-room-confroom@example.com" 13 ERROR=err.tmp 14 15 rm -r $STORE 16 rm -r $STATIC 17 rm -r $PREFS 18 rm $ERROR 19 rm out*.tmp 20 21 mkdir -p "$PREFS/$USER" 22 echo 'Europe/Oslo' > "$PREFS/$USER/TZID" 23 echo 'share' > "$PREFS/$USER/freebusy_sharing" 24 25 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \ 26 | "$SHOWMAIL" \ 27 > out0.tmp 28 29 grep -q 'METHOD:REPLY' out0.tmp \ 30 && ! grep -q '^FREEBUSY' out0.tmp \ 31 && echo "Success" \ 32 || echo "Failed" 33 34 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR \ 35 | "$SHOWMAIL" \ 36 > out1.tmp 37 38 grep -q 'METHOD:REPLY' out1.tmp \ 39 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out1.tmp \ 40 && echo "Success" \ 41 || echo "Failed" 42 43 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \ 44 | "$SHOWMAIL" \ 45 > out2.tmp 46 47 grep -q 'METHOD:REPLY' out2.tmp \ 48 && [ `grep 'FREEBUSY;FBTYPE=BUSY' out2.tmp | wc -l` = '3' ] \ 49 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141211T230000Z/20141212T230000Z' out2.tmp \ 50 && echo "Success" \ 51 || echo "Failed" 52 53 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day-reschedule-instance.txt" 2>> $ERROR \ 54 | "$SHOWMAIL" \ 55 > out3.tmp 56 57 grep -q 'METHOD:REPLY' out3.tmp \ 58 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out3.tmp \ 59 && echo "Success" \ 60 || echo "Failed" 61 62 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \ 63 | "$SHOWMAIL" \ 64 > out4.tmp 65 66 grep -q 'METHOD:REPLY' out4.tmp \ 67 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T230000Z/20141115T230000Z' out4.tmp \ 68 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141113T230000Z/20141114T230000Z' out4.tmp \ 69 && echo "Success" \ 70 || echo "Failed"