imip-agent

tests/test_resource_invitation_recurring_indefinitely.sh

1047:c06cdeae95a3
2016-02-08 Paul Boddie Added a test of booking two resources sharing a quota at the same time.
     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-indefinitely.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 "$FREEBUSY_SCRIPT" "$USER" $FREEBUSY_ARGS $ARGS 2>> $ERROR    41     42    grep -q 'event14@example.com' "$STORE/$USER/freebusy-providers" \    43 && echo "Success" \    44 || echo "Failed"    45     46   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-indefinitely.txt" 2>> $ERROR    47 echo "Cancel..."    48     49   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    50 | "$SHOWMAIL" \    51 > out4.tmp    52     53    grep -q 'METHOD:REPLY' out4.tmp \    54 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out4.tmp \    55 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out4.tmp \    56 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out4.tmp \    57 && echo "Success" \    58 || echo "Failed"    59     60    ! grep -q 'event14@example.com' "$STORE/$USER/freebusy-providers" \    61 && echo "Success" \    62 || echo "Failed"    63     64 # Re-add event to test scheduling and presence in the freebusy-providers file.    65     66   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-indefinitely.txt" 2>> $ERROR \    67 | "$SHOWMAIL" \    68 > out5.tmp    69     70    grep -q 'METHOD:REPLY' out5.tmp \    71 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out5.tmp \    72 && echo "Success" \    73 || echo "Failed"    74     75   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    76 | "$SHOWMAIL" \    77 > out6.tmp    78     79    grep -q 'METHOD:REPLY' out6.tmp \    80 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out6.tmp \    81 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out6.tmp \    82 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out6.tmp \    83 && echo "Success" \    84 || echo "Failed"    85     86    grep -q 'event14@example.com' "$STORE/$USER/freebusy-providers" \    87 && echo "Success" \    88 || echo "Failed"