imip-agent

tests/test_outgoing_invitation.sh

1292:8a08870781bb
2017-10-06 Paul Boddie Remove SENT-BY from attributes where the sender matches the user. Simplify get_timestamp, making it use get_time.
     1 #!/bin/sh     2      3 . "`dirname \"$0\"`/common.sh"     4      5 USER="mailto:paul.boddie@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 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2>> $ERROR    13     14    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    15 |  tee out1.tmp \    16 |  grep -q "^20141126T150000Z${TAB}20141126T160000Z" \    17 && echo "Success" \    18 || echo "Failed"    19     20 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2>> $ERROR    21 echo "Cancel..."    22     23    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    24 >  out2.tmp    25     26    ! grep -q '^2' "out2.tmp" \    27 && echo "Success" \    28 || echo "Failed"    29     30 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR    31     32    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    33 >  out3.tmp    34     35    [ `cat "out3.tmp" | wc -l` = '3' ] \    36 && grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out3.tmp" \    37 && echo "Success" \    38 || echo "Failed"    39     40 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-instance.txt" 2>> $ERROR    41     42    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    43 >  out4.tmp    44     45    [ `cat "out4.tmp" | wc -l` = '2' ] \    46 && ! grep -q "^20141114T090000Z${TAB}20141114T100000Z" "out4.tmp" \    47 && echo "Success" \    48 || echo "Failed"    49     50 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-reschedule-instance.txt" 2>> $ERROR    51     52    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    53 >  out5.tmp    54     55    grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out5.tmp" \    56 && ! grep -q "^20141010T090000Z${TAB}20141010T100000Z" "out5.tmp" \    57 && echo "Success" \    58 || echo "Failed"    59     60 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR    61     62    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    63 >  out6.tmp    64     65    ! grep -q '^2' "out6.tmp" \    66 && echo "Success" \    67 || echo "Failed"    68     69 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR    70     71    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    72 >  out7.tmp    73     74    [ `cat "out7.tmp" | wc -l` = '3' ] \    75 && grep -q "^20141211T230000Z${TAB}20141212T230000Z" "out7.tmp" \    76 && echo "Success" \    77 || echo "Failed"    78     79 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR    80     81    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    82 >  out8.tmp    83     84    ! grep -q '^2' "out8.tmp" \    85 && echo "Success" \    86 || echo "Failed"    87     88 # Switch time zones.    89     90 echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID"    91     92 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR    93     94    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \    95 >  out9.tmp    96     97    [ `cat "out9.tmp" | wc -l` = '3' ] \    98 && grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out9.tmp" \    99 && echo "Success" \   100 || echo "Failed"   101    102 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR   103    104    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \   105 >  out10.tmp   106    107    ! grep -q '^2' "out10.tmp" \   108 && echo "Success" \   109 || echo "Failed"   110    111 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR   112    113    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \   114 >  out11.tmp   115    116    [ `cat "out11.tmp" | wc -l` = '3' ] \   117 && grep -q "^20141211T230000Z${TAB}20141212T230000Z" "out11.tmp" \   118 && echo "Success" \   119 || echo "Failed"   120    121 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR   122    123    "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \   124 >  out12.tmp   125    126    ! grep -q '^2' "out12.tmp" \   127 && echo "Success" \   128 || echo "Failed"