imip-agent

tests/test_freebusy_publishing.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 SENDER="mailto:resource-room-confroom@example.com"     7      8 mkdir -p "$PREFS/$USER"     9 echo 'Europe/Oslo' > "$PREFS/$USER/TZID"    10 echo 'share' > "$PREFS/$USER/freebusy_sharing"    11     12   "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-publish.txt" 2>> $ERROR \    13 | "$SHOWMAIL" \    14 > out0.tmp    15     16   "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \    17 > out1.tmp    18     19    grep -q "^20140401T070000Z${TAB}20140401T080000Z" "out1.tmp" \    20 && grep -q "^20140401T080000Z${TAB}20140401T100000Z" "out1.tmp" \    21 && echo "Success" \    22 || echo "Failed"    23     24   "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-publish-again.txt" 2>> $ERROR \    25 | "$SHOWMAIL" \    26 > out2.tmp    27     28   "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \    29 > out3.tmp    30     31    grep -q "^20140401T070000Z${TAB}20140401T080000Z" "out3.tmp" \    32 && ! grep -q "^20140401T080000Z${TAB}20140401T100000Z" "out3.tmp" \    33 && grep -q "^20140401T083000Z${TAB}20140401T100000Z" "out3.tmp" \    34 && echo "Success" \    35 || echo "Failed"