tests: Remove hardcoded sizes from extend tests

In order to update these tests it required first running df -h to obtain
the new disk size and then adding that value to check.sh
This commit replaces the hardcoded values with a regex that checks that
the filesystem is somewhere between 400-599MB in size. Before being
extended this would have been somewhere in the region of 200-300MB.

Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
Dave Tucker 2017-08-08 13:47:32 +01:00
parent e17a12219a
commit 6aed51ca5c
3 changed files with 3 additions and 3 deletions

View File

@ -9,5 +9,5 @@ function failed {
[ -f /var/lib/docker/bar ] || failed
touch /var/lib/docker/foo || failed
df -h | grep -q "490.9M" || failed
df -h | grep -qE "[4-5][0-9]{2}\.[0-9]{1,}M" || failed
printf "extend test suite PASSED\n" >&1

View File

@ -9,5 +9,5 @@ function failed {
[ -f /var/lib/docker/bar ] || failed
touch /var/lib/docker/foo || failed
df -h | grep -q "511.0M" || failed
df -h | grep -qE "[4-5][0-9]{2}\.[0-9]{1,}M" || failed
printf "extend test suite PASSED\n" >&1

View File

@ -9,5 +9,5 @@ function failed {
[ -f /var/lib/docker/bar ] || failed
touch /var/lib/docker/foo || failed
df -h | grep -q "504.8M" || failed
df -h | grep -qE "[4-5][0-9]{2}\.[0-9]{1,}M" || failed
printf "extend test suite PASSED\n" >&1