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 PERSON_SCRIPT="$THIS_DIR/../imip_person.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:paul.boddie@example.com" 13 SENDER="mailto:resource-room-confroom@example.com" 14 FBFILE="$STORE/$USER/freebusy" 15 FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" 16 TAB=`printf '\t'` 17 18 PYTHONPATH="$THIS_DIR/.." 19 export PYTHONPATH 20 21 ERROR=err.tmp 22 23 rm -r $STORE 24 rm -r $STATIC 25 rm -r $PREFS 26 rm $ERROR 27 rm out*.tmp 28 29 mkdir -p "$PREFS/$USER" 30 echo 'Europe/Oslo' > "$PREFS/$USER/TZID" 31 echo 'share' > "$PREFS/$USER/freebusy_sharing" 32 33 "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-publish.txt" 2>> $ERROR \ 34 | "$SHOWMAIL" \ 35 > out0.tmp 36 37 grep -q "^20140401T070000Z${TAB}20140401T080000Z" "$FBOTHERFILE" \ 38 && grep -q "^20140401T080000Z${TAB}20140401T100000Z" "$FBOTHERFILE" \ 39 && echo "Success" \ 40 || echo "Failed" 41 42 "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-publish-again.txt" 2>> $ERROR \ 43 | "$SHOWMAIL" \ 44 > out0.tmp 45 46 grep -q "^20140401T070000Z${TAB}20140401T080000Z" "$FBOTHERFILE" \ 47 && ! grep -q "^20140401T080000Z${TAB}20140401T100000Z" "$FBOTHERFILE" \ 48 && grep -q "^20140401T083000Z${TAB}20140401T100000Z" "$FBOTHERFILE" \ 49 && echo "Success" \ 50 || echo "Failed"