imip-agent

tests/test_resource_invitation.sh

1039:a12150034cbd
2016-02-08 Paul Boddie Added a journal storage area, maintaining quota and collective scheduling data for scheduling decisions. Introduced confirmation and retraction functions for resource scheduling so that quotas and collective schedules can be maintained and thus queried by scheduling functions. Updated the documentation, tools and tests.
     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/fb-request.txt" 2>> $ERROR \    21 | "$SHOWMAIL" \    22 > out1.tmp    23     24    grep -q 'METHOD:REPLY' out1.tmp \    25 && ! grep -q '^FREEBUSY' out1.tmp \    26 && echo "Success" \    27 || echo "Failed"    28     29   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2>> $ERROR \    30 | "$SHOWMAIL" \    31 > out2.tmp    32     33    grep -q 'METHOD:REPLY' out2.tmp \    34 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \    35 && echo "Success" \    36 || echo "Failed"    37     38   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \    39 | "$SHOWMAIL" \    40 > out3.tmp    41     42    grep -q 'METHOD:REPLY' out3.tmp \    43 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out3.tmp \    44 && echo "Success" \    45 || echo "Failed"    46     47   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-conflict.txt" 2>> $ERROR \    48 | "$SHOWMAIL" \    49 > out4.tmp    50     51    grep -q 'METHOD:REPLY' out4.tmp \    52 && grep -q 'ATTENDEE;PARTSTAT=DECLINED' out4.tmp \    53 && echo "Success" \    54 || echo "Failed"    55     56   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-conflict-utc.txt" 2>> $ERROR \    57 | "$SHOWMAIL" \    58 > out5.tmp    59     60    grep -q 'METHOD:REPLY' out5.tmp \    61 && grep -q 'ATTENDEE;PARTSTAT=DECLINED' out5.tmp \    62 && echo "Success" \    63 || echo "Failed"    64     65   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \    66 | "$SHOWMAIL" \    67 > out6.tmp    68     69    grep -q 'METHOD:REPLY' out6.tmp \    70 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out6.tmp \    71 && [ `grep 'FREEBUSY;FBTYPE=BUSY' out6.tmp | wc -l` = '1' ] \    72 && echo "Success" \    73 || echo "Failed"    74     75 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2>> $ERROR    76 echo "Cancel..."    77     78   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \    79 | "$SHOWMAIL" \    80 > out7.tmp    81     82    grep -q 'METHOD:REPLY' out7.tmp \    83 && ! grep -q '^FREEBUSY' out7.tmp \    84 && echo "Success" \    85 || echo "Failed"    86     87 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-spoofed.txt" 2>> $ERROR    88 echo "Spoof..."    89     90   "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \    91 | "$SHOWMAIL" \    92 > out8.tmp    93     94    grep -q 'METHOD:REPLY' out8.tmp \    95 && ! grep -q '^FREEBUSY' out8.tmp \    96 && echo "Success" \    97 || echo "Failed"