1.1 --- a/tests/test_resource_invitation_constraints_quota.sh Sat May 14 00:55:51 2016 +0200
1.2 +++ b/tests/test_resource_invitation_constraints_quota.sh Sat May 14 00:56:54 2016 +0200
1.3 @@ -8,6 +8,25 @@
1.4 QUOTA=cars
1.5 OTHER_QUOTA=rooms
1.6
1.7 +# Test quota enforcement where no limits apply, with resources first attempting
1.8 +# to schedule reservations before checking a quota applying to both resources.
1.9 +
1.10 +# The result should be a scheduling attempt with the first resource succeeding,
1.11 +# but another with the second resource being declined due to a lack of quota.
1.12 +# An adjustment to the quota then permits the successful reservation of the
1.13 +# second resource. The first reservation is then cancelled.
1.14 +
1.15 +# Quota-wide free/busy validation is then enabled, and the reservation of the
1.16 +# second resource is replayed to allow the journal to maintain the free/busy
1.17 +# details of the organiser. Now, when an attempt is made to reserve the first
1.18 +# resource at the same time once again, this fails because the journal now knows
1.19 +# that the organiser is occupied during the period in question. Moving the
1.20 +# reservation of the first resource leads to a successful booking.
1.21 +
1.22 +# Meanwhile, raising the quota once again and attempting to reserve both
1.23 +# resources using a separate event leads to only one resource being booked due
1.24 +# to a lack of quota.
1.25 +
1.26 mkdir -p "$PREFS/$USER1"
1.27 echo 'Europe/Oslo' > "$PREFS/$USER1/TZID"
1.28 echo 'share' > "$PREFS/$USER1/freebusy_sharing"