1.1 --- a/tests/test_resource_invitation_constraints_quota_recurring_limits.sh Sat May 14 00:55:51 2016 +0200
1.2 +++ b/tests/test_resource_invitation_constraints_quota_recurring_limits.sh Sat May 14 00:56:54 2016 +0200
1.3 @@ -10,6 +10,18 @@
1.4 SENDERADDRESS2="vincent.vole@example.com"
1.5 QUOTA=cars
1.6
1.7 +# Test quota enforcement on two resources, first checking whether the resources
1.8 +# can schedule an incoming reservation, then checking whether the reservation
1.9 +# would exceed the organiser's quota applying collectively to both resources.
1.10 +
1.11 +# The result should be the first scheduling attempt being declined because it
1.12 +# attempts to reserve an indefinite amount of time, with the second attempt
1.13 +# succeeding but only for one resource because the quota is used up reserving
1.14 +# one of the two resources requested. This reservation is then cancelled.
1.15 +
1.16 +# Another attempt is made by a user with a larger quota, and this succeeds in
1.17 +# reserving both resources.
1.18 +
1.19 mkdir -p "$PREFS/$USER1"
1.20 echo 'Europe/Oslo' > "$PREFS/$USER1/TZID"
1.21 echo 'share' > "$PREFS/$USER1/freebusy_sharing"
1.22 @@ -147,7 +159,8 @@
1.23
1.24 # Cancel the event.
1.25
1.26 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-cars-recurring.txt" 2>> $ERROR
1.27 + sed 's/FREQ=DAILY/FREQ=DAILY;COUNT=5/;' "$TEMPLATES/event-cancel-cars-recurring.txt" \
1.28 +| "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
1.29
1.30 "$LIST_SCRIPT" $LIST_ARGS "$SENDER1" "freebusy" \
1.31 > out2s.tmp
1.32 @@ -159,7 +172,8 @@
1.33
1.34 # Present the request to the resource.
1.35
1.36 - "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-cars-recurring.txt" 2>> $ERROR \
1.37 + sed 's/FREQ=DAILY/FREQ=DAILY;COUNT=5/;' "$TEMPLATES/event-cancel-cars-recurring.txt" \
1.38 +| "$RESOURCE_SCRIPT" $ARGS 2>> $ERROR \
1.39 | tee out3r.tmp \
1.40 | "$SHOWMAIL" \
1.41 > out3.tmp