# Fast option check tests This chapter contains fast scenarios that test vmdebootstrap option handling. These scenarios do not actually build images, they only verify that vmdebootstrap parses the command line correctly. SCENARIO --squash and --image used together ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --squash=FOO --image=BAR --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching --squash AND vmdebootstrap wrote an error message matching --image SCENARIO --squash and --arch arm64 used together ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --squash=FOO --arch=arm64 --dry-run THEN vmdebootstrap exited with a zero exit code SCENARIO --use-uefi and --arch arm64 used together ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --grub --use-uefi --arch=arm64 --dry-run THEN vmdebootstrap exited with a zero exit code SCENARIO --arch arm64 used with --image but without --use-uefi ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --foreign=PATH --arch=arm64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching UEFI AND vmdebootstrap wrote an error message matching arm64 SCENARIO --use-uefi and --arch arm64 used without grub ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --use-uefi --arch=arm64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching UEFI AND vmdebootstrap wrote an error message matching Grub SCENARIO --use-uefi and --arch arm64 used without image ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --grub --use-uefi --arch=arm64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching disk image filename AND vmdebootstrap wrote an error message matching squash SCENARIO --size too small for a bootstrap ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --size=100M --dry-run THEN vmdebootstrap exited with a non-zero exit code 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 WHEN user attempts to run vmdebootstrap ... --image=FOO --distribution=stable --dry-run THEN vmdebootstrap exited with a zero exit code SCENARIO Debian distribution jessie name check ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --distribution=jessie --dry-run THEN vmdebootstrap exited with a zero exit code SCENARIO allow use of arch and foreign options ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --arch=armhf --foreign=PATH --dry-run THEN vmdebootstrap exited with a zero exit code SCENARIO disallow use of uefi on unsupported architectures ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --grub --use-uefi --arch=armel --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching armel AND vmdebootstrap wrote an error message matching not a supported AND vmdebootstrap wrote an error message matching UEFI SCENARIO disallow use of bootpartition if ESP already set ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --bootoffset=1024 --grub --use-uefi --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching separate boot AND vmdebootstrap wrote an error message matching not supported AND vmdebootstrap wrote an error message matching UEFI SCENARIO disallow UEFI support on wheezy except on amd64 ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --grub --use-uefi --roottype=ext2 --distribution=wheezy --arch=arm64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching Only amd64 AND vmdebootstrap wrote an error message matching supports UEFI AND vmdebootstrap wrote an error message matching Wheezy SCENARIO disallow apt-mirror without configure-apt ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --apt-mirror=mirror THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching requires --configure-apt as well SCENARIO default includes the kernel package ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a zero exit code AND vmdebootstrap wrote a message matching linux-image-amd64 SCENARIO no-linux omits the kernel package ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --no-kernel --image=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a zero exit code AND vmdebootstrap wrote a message not matching linux-image-amd64 SCENARIO kernel-package includes the kernel package ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --kernel-package unlikely --image=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a zero exit code AND vmdebootstrap wrote a message not matching linux-image-amd64 AND vmdebootstrap wrote a message matching unlikely SCENARIO no-kernel overrides kernel-package ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --no-kernel --kernel-package unlikely --image=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a zero exit code AND vmdebootstrap wrote a message not matching linux-image-amd64 AND vmdebootstrap wrote a message not matching unlikely SCENARIO package includes the specified package ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --package unlikely --image=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a zero exit code AND vmdebootstrap wrote a message matching linux-image-amd64 AND vmdebootstrap wrote a message matching unlikely SCENARIO only images can be converted to qcow2 ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --convert-qcow2 --tarball --arch=amd64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching qcow2 can only AND vmdebootstrap wrote an error message matching with --image SCENARIO tarball is not usable with image ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --tarball=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching not both SCENARIO tarball is not usable with squash ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --squash=FOO --tarball=FOO --arch=amd64 --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching not both SCENARIO masking systemd-networkd without updating initramfs ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --no-systemd-networkd --no-update-initramfs --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching requires updating the SCENARIO btrfs not yet supported with extlinux ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --roottype btrfs --extlinux --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching not yet supported SCENARIO btrfs not yet supported without disabling extlinux ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --roottype btrfs --dry-run THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching not yet supported SCENARIO bootflag requires argument ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --bootflag THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching bootflag AND vmdebootstrap wrote an error message matching requires an argument SCENARIO wheezy image does not support ext4 ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap ... --image=FOO --roottype ext4 --dry-run --distribution wheezy THEN vmdebootstrap exited with a non-zero exit code AND vmdebootstrap wrote an error message matching Wheezy images using ext4 will not be able to boot