imip-agent

tests/test_resource_invitation_recurring_timezones.sh

1028:7f4bd7d4236a
2016-01-29 Paul Boddie Added support for additional scheduling modules, moving the existing functionality into the freebusy module, providing initial functionality for an access-based module, and introducing a mechanism to update the registry of modules explicitly. Added a test of combining scheduling functions.
     1 #!/bin/sh     2      3 . "`dirname \"$0\"`/common.sh"     4      5 USER="mailto:resource-room-confroom@example.com"     6      7 mkdir -p "$PREFS/$USER"     8 echo 'Europe/Oslo' > "$PREFS/$USER/TZID"     9 echo 'share' > "$PREFS/$USER/freebusy_sharing"    10     11   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    12 | "$SHOWMAIL" \    13 > out0.tmp    14     15    grep -q 'METHOD:REPLY' out0.tmp \    16 && ! grep -q '^FREEBUSY' out0.tmp \    17 && echo "Success" \    18 || echo "Failed"    19     20   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate.txt" 2>> $ERROR \    21 | "$SHOWMAIL" \    22 > out2.tmp    23     24    grep -q 'METHOD:REPLY' out2.tmp \    25 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \    26 && echo "Success" \    27 || echo "Failed"    28     29   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    30 | "$SHOWMAIL" \    31 > out3.tmp    32     33    grep -q 'METHOD:REPLY' out3.tmp \    34 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out3.tmp \    35 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out3.tmp \    36 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out3.tmp \    37 && echo "Success" \    38 || echo "Failed"    39     40   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate.txt" 2>> $ERROR    41 echo "Cancel..."    42     43   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    44 | "$SHOWMAIL" \    45 > out4.tmp    46     47    grep -q 'METHOD:REPLY' out4.tmp \    48 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out4.tmp \    49 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out4.tmp \    50 && echo "Success" \    51 || echo "Failed"    52     53   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate-floating.txt" 2>> $ERROR \    54 | "$SHOWMAIL" \    55 > out5.tmp    56     57    grep -q 'METHOD:REPLY' out5.tmp \    58 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out5.tmp \    59 && echo "Success" \    60 || echo "Failed"    61     62   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    63 | "$SHOWMAIL" \    64 > out6.tmp    65     66    grep -q 'METHOD:REPLY' out6.tmp \    67 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out6.tmp \    68 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out6.tmp \    69 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out6.tmp \    70 && echo "Success" \    71 || echo "Failed"    72     73   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate-floating.txt" 2>> $ERROR    74 echo "Cancel..."    75     76   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    77 | "$SHOWMAIL" \    78 > out7.tmp    79     80    grep -q 'METHOD:REPLY' out7.tmp \    81 && ! grep -q '^FREEBUSY' out7.tmp \    82 && echo "Success" \    83 || echo "Failed"    84     85 # Switch time zones.    86     87 echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID"    88     89   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate.txt" 2>> $ERROR \    90 | "$SHOWMAIL" \    91 > out8.tmp    92     93    grep -q 'METHOD:REPLY' out8.tmp \    94 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out8.tmp \    95 && echo "Success" \    96 || echo "Failed"    97     98   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    99 | "$SHOWMAIL" \   100 > out9.tmp   101    102    grep -q 'METHOD:REPLY' out9.tmp \   103 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out9.tmp \   104 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out9.tmp \   105 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out9.tmp \   106 && echo "Success" \   107 || echo "Failed"   108    109   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate.txt" 2>> $ERROR   110 echo "Cancel..."   111    112   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \   113 | "$SHOWMAIL" \   114 > out10.tmp   115    116    grep -q 'METHOD:REPLY' out10.tmp \   117 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out10.tmp \   118 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out10.tmp \   119 && echo "Success" \   120 || echo "Failed"   121    122   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate-floating.txt" 2>> $ERROR \   123 | "$SHOWMAIL" \   124 > out11.tmp   125    126    grep -q 'METHOD:REPLY' out11.tmp \   127 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out11.tmp \   128 && echo "Success" \   129 || echo "Failed"   130    131   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \   132 | "$SHOWMAIL" \   133 > out12.tmp   134    135    grep -q 'METHOD:REPLY' out12.tmp \   136 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T080000Z/20141114T090000Z' out12.tmp \   137 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T080000Z/20141212T090000Z' out12.tmp \   138 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T080000Z/20150109T090000Z' out12.tmp \   139 && echo "Success" \   140 || echo "Failed"