imip-agent

tests/test_resource_invitation_recurring_indefinitely.sh

1272:65e999dd88f0
2017-09-18 Paul Boddie Added a convenience method for loading objects. Added docstrings. client-editing-simplification
     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 echo '20141010' > "$PREFS/$USER/window_start"    11     12   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    13 | "$SHOWMAIL" \    14 > out0.tmp    15     16    grep -q 'METHOD:REPLY' out0.tmp \    17 && ! grep -q '^FREEBUSY' out0.tmp \    18 && echo "Success" \    19 || echo "Failed"    20     21   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-indefinitely.txt" 2>> $ERROR \    22 | "$SHOWMAIL" \    23 > out2.tmp    24     25    grep -q 'METHOD:REPLY' out2.tmp \    26 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \    27 && echo "Success" \    28 || echo "Failed"    29     30   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    31 | "$SHOWMAIL" \    32 > out3.tmp    33     34    grep -q 'METHOD:REPLY' out3.tmp \    35 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out3.tmp \    36 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out3.tmp \    37 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out3.tmp \    38 && echo "Success" \    39 || echo "Failed"    40     41 "$FREEBUSY_SCRIPT" "$USER" $FREEBUSY_ARGS $ARGS 2>> $ERROR    42     43    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_providers" \    44 |  tee out3p.tmp \    45 |  grep -q 'event14@example.com' \    46 && echo "Success" \    47 || echo "Failed"    48     49   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-indefinitely.txt" 2>> $ERROR    50 echo "Cancel..."    51     52   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    53 | "$SHOWMAIL" \    54 > out4.tmp    55     56    grep -q 'METHOD:REPLY' out4.tmp \    57 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out4.tmp \    58 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out4.tmp \    59 && ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out4.tmp \    60 && echo "Success" \    61 || echo "Failed"    62     63    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_providers" \    64 >  out4p.tmp    65     66    ! grep -q 'event14@example.com' "out4p.tmp" \    67 && echo "Success" \    68 || echo "Failed"    69     70 # Re-add event to test scheduling and presence in the freebusy-providers file.    71     72   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-indefinitely.txt" 2>> $ERROR \    73 | "$SHOWMAIL" \    74 > out5.tmp    75     76    grep -q 'METHOD:REPLY' out5.tmp \    77 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out5.tmp \    78 && echo "Success" \    79 || echo "Failed"    80     81   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    82 | "$SHOWMAIL" \    83 > out6.tmp    84     85    grep -q 'METHOD:REPLY' out6.tmp \    86 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out6.tmp \    87 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out6.tmp \    88 && grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out6.tmp \    89 && echo "Success" \    90 || echo "Failed"    91     92    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_providers" \    93 |  tee out6p.tmp \    94 |  grep -q 'event14@example.com' \    95 && echo "Success" \    96 || echo "Failed"