diff options
-rwxr-xr-x | bin/vmdebootstrap | 4 | ||||
-rw-r--r-- | yarns/200-fast-tests.yarn | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index b65a282..82dcfd7 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -147,6 +147,10 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth raise cliapp.AppException( 'You must give disk image filename or use either a ' 'tarball filename or use squash') + if self.settings['size'] <= 100000000: + raise cliapp.AppException( + 'A size of %s bytes is too small for a ' + 'bootstrap.' % self.settings['size']) if self.settings['image'] and not self.settings['size']: raise cliapp.AppException( 'If disk image is specified, you must give image size.') diff --git a/yarns/200-fast-tests.yarn b/yarns/200-fast-tests.yarn index 352c8ec..dc6ddf8 100644 --- a/yarns/200-fast-tests.yarn +++ b/yarns/200-fast-tests.yarn @@ -48,13 +48,13 @@ verify that vmdebootstrap parses the command line correctly. AND vmdebootstrap wrote an error message matching disk image filename AND vmdebootstrap wrote an error message matching squash - SCENARIO --image used with a zero size + SCENARIO --size too small for a bootstrap ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap - ... --image=FOO --size=0 --dry-run + ... --image=FOO --size=100M --dry-run THEN vmdebootstrap exited with a non-zero exit code - AND vmdebootstrap wrote an error message matching disk image - AND vmdebootstrap wrote an error message matching must + AND vmdebootstrap wrote an error message matching too small + AND vmdebootstrap wrote an error message matching bootstrap SCENARIO Debian distribution stable name check ASSUMING fast tests are requested |