From 5a4f3228332b7e9b7890c7ea6d139e513a7a06a6 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sat, 23 Jan 2016 17:47:07 +0000 Subject: handle extlinux being true by default with a test case --- bin/vmdebootstrap | 2 +- yarns/200-fast-tests.yarn | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 30fca9d..2971260 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -175,7 +175,7 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth 'requires updating the initramfs.') if self.settings['roottype'] == 'btrfs' and\ - self.settings['extlinux']: + self.settings['extlinux'] and not self.settings['grub']: raise cliapp.AppException( 'extlinux is not yet supported on btrfs. Use grub.') uefi = self.handlers[Uefi.name] diff --git a/yarns/200-fast-tests.yarn b/yarns/200-fast-tests.yarn index 803d09d..352c8ec 100644 --- a/yarns/200-fast-tests.yarn +++ b/yarns/200-fast-tests.yarn @@ -174,3 +174,17 @@ verify that vmdebootstrap parses the command line correctly. ... --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 -- cgit v1.2.1