Define size of test environment

Sometimes is useful to be able to limit the size of a test environment
to validate some scenarios that are bound to disk size.

This commit adds a -s (size) option that can be used when creating test
environments so the user can control how much space is available in that
environment. If not used, the test environment works the same as before.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit is contained in:
Castulo Martinez
2019-01-10 14:05:01 -08:00
committed by Otavio Pontes
parent 116a4c612e
commit 39e2d40127
13 changed files with 187 additions and 80 deletions
@@ -22,9 +22,9 @@ test_setup() {
assert_file_exists "$TARGETDIR"/usr/share/clear/bundles/test-bundle1
assert_file_exists "$TARGETDIR"/usr/share/clear/bundles/test-bundle2
assert_file_exists "$TARGETDIR"/usr/share/clear/bundles/test-bundle3
assert_file_exists "$TEST_NAME"/target-dir/test-file1
assert_file_exists "$TEST_NAME"/target-dir/test-file2
assert_file_exists "$TEST_NAME"/target-dir/test-file3
assert_file_exists "$TARGETDIR"/test-file1
assert_file_exists "$TARGETDIR"/test-file2
assert_file_exists "$TARGETDIR"/test-file3
expected_output=$(cat <<-EOM
Error: bundle requested to be removed is required by the following bundles:
format: