imip-agent

tests/test_freebusy_publishing.sh

1088:31d839d508f6
2016-03-10 Paul Boddie Introduced a mechanism for selecting storage using a store type and the existing "directory" information. Made a specific PostgreSQL store type. Changed various tools and tests to support non-file store types, introducing a script to access stored data and to serialise it for inspection using file-based tools. freebusy-collections
     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"