1.1 --- a/tests/test_resource_invitation_constraints_next_free.sh Tue Oct 27 18:44:26 2015 +0100
1.2 +++ b/tests/test_resource_invitation_constraints_next_free.sh Tue Oct 27 18:46:48 2015 +0100
1.3 @@ -14,6 +14,7 @@
1.4 SENDER="mailto:paul.boddie@example.com"
1.5 RIVALSENDER="mailto:vincent.vole@example.com"
1.6 FBFILE="$STORE/$USER/freebusy"
1.7 +FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER"
1.8 FBOFFERFILE="$STORE/$USER/freebusy-offers"
1.9 FBSENDERFILE="$STORE/$SENDER/freebusy"
1.10 FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER"
1.11 @@ -79,6 +80,17 @@
1.12 | "$SHOWMAIL" \
1.13 > out2.tmp
1.14
1.15 +# Publish some conflicting periods as busy.
1.16 +
1.17 + "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-publish-conflicts.txt" 2>> $ERROR \
1.18 +| "$SHOWMAIL" \
1.19 +> out3.tmp
1.20 +
1.21 + grep -q "^20141126T160000Z${TAB}20141126T170000Z" "$FBOTHERFILE" \
1.22 +&& grep -q "^20141126T180000Z${TAB}20141126T190000Z" "$FBOTHERFILE" \
1.23 +&& echo "Success" \
1.24 +|| echo "Failed"
1.25 +
1.26 # Attempt to schedule an event with the resource.
1.27
1.28 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-sauna-good.txt" 2>> $ERROR
1.29 @@ -88,7 +100,8 @@
1.30 || echo "Failed"
1.31
1.32 # Present the request to the resource. This should cause the event to be
1.33 -# proposed one hour later.
1.34 +# proposed not just after the requested period, but also after the busy periods
1.35 +# published to the resource.
1.36
1.37 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-sauna-good.txt" 2>> $ERROR \
1.38 | tee out6r.tmp \
1.39 @@ -101,7 +114,11 @@
1.40 || echo "Failed"
1.41
1.42 ! grep -q "^20141126T150000Z${TAB}20141126T154500Z" "$FBOFFERFILE" \
1.43 -&& grep -q "^20141126T160000Z${TAB}20141126T164500Z" "$FBOFFERFILE" \
1.44 +&& ! grep -q "^20141126T160000Z${TAB}20141126T164500Z" "$FBOFFERFILE" \
1.45 +&& ! grep -q "^20141126T170000Z${TAB}20141126T174500Z" "$FBOFFERFILE" \
1.46 +&& ! grep -q "^20141126T180000Z${TAB}20141126T184500Z" "$FBOFFERFILE" \
1.47 +&& ! grep -q "^20141126T190000Z${TAB}20141126T194500Z" "$FBOFFERFILE" \
1.48 +&& grep -q "^20141126T200000Z${TAB}20141126T204500Z" "$FBOFFERFILE" \
1.49 && echo "Success" \
1.50 || echo "Failed"
1.51
1.52 @@ -135,7 +152,7 @@
1.53 "$OUTGOING_SCRIPT" $ARGS < out8.tmp 2>> $ERROR
1.54
1.55 ! grep -q "^20141126T150000Z${TAB}20141126T154500Z" "$FBSENDERFILE" \
1.56 -&& grep -q "^20141126T160000Z${TAB}20141126T164500Z" "$FBSENDERFILE" \
1.57 +&& grep -q "^20141126T200000Z${TAB}20141126T204500Z" "$FBSENDERFILE" \
1.58 && echo "Success" \
1.59 || echo "Failed"
1.60
1.61 @@ -152,17 +169,21 @@
1.62 > out9.tmp
1.63
1.64 grep -q 'METHOD:REPLY' out9.tmp \
1.65 -&& grep -q 'DTSTART;TZID=Europe/Oslo.*:20141126T170000' out9.tmp \
1.66 +&& grep -q 'DTSTART;TZID=Europe/Oslo.*:20141126T210000' out9.tmp \
1.67 && echo "Success" \
1.68 || echo "Failed"
1.69
1.70 ! grep -q "^20141126T150000Z${TAB}20141126T154500Z" "$FBOFFERFILE" \
1.71 && ! grep -q "^20141126T160000Z${TAB}20141126T164500Z" "$FBOFFERFILE" \
1.72 +&& ! grep -q "^20141126T170000Z${TAB}20141126T174500Z" "$FBOFFERFILE" \
1.73 +&& ! grep -q "^20141126T180000Z${TAB}20141126T184500Z" "$FBOFFERFILE" \
1.74 +&& ! grep -q "^20141126T190000Z${TAB}20141126T194500Z" "$FBOFFERFILE" \
1.75 +&& ! grep -q "^20141126T200000Z${TAB}20141126T204500Z" "$FBOFFERFILE" \
1.76 && echo "Success" \
1.77 || echo "Failed"
1.78
1.79 [ `grep "event19@example.com" "$FBFILE" | wc -l` = '5' ] \
1.80 && [ `grep "event13@example.com" "$FBFILE" | wc -l` = '1' ] \
1.81 -&& grep -q "^20141126T160000Z${TAB}20141126T164500Z" "$FBFILE" \
1.82 +&& grep -q "^20141126T200000Z${TAB}20141126T204500Z" "$FBFILE" \
1.83 && echo "Success" \
1.84 || echo "Failed"