Disk space reservation tests
Test add/release disk reservation
-
When no reservation exists, add a reservation. Check the value. -
Increment an existing reservation. Check the value. -
Decrement the above two reservations. Check the value is zero. -
Increment the reservation then decrement it by a larger value. Should not cause an exception, should silently go to zero. Check the value is zero.
Test changing disk system
-
When no reservation exists, add a reservation with a new disk system. It should succeed and set the disk system to the new value. Check the value. -
Decrement the reservation with the old disk system. This should ignore the request, log an error but not throw an exception. The reservation will not be decremented because the disk system did not match. Check the value did not change. -
When a reservation exists, add a reservation with a different disk system. This should log an error and drop the previous reservation. Check the disk system and value matches the new reservation. -
Decrement the reservation with the new disk system. Check the value.
Test changing the mount Id.
-
When no reservation exists, add a reservation with a new disk system as previously and a mount id. -
Add a new reservation for a new mount id but with the same disk system, it should replace the previous one -
Decrement the reservation with the previous mount id, it should have no efect -
Decrement the reservation with the new mount id, it should be decremented
Edited by Jorge Camarero Vera