summaryrefslogtreecommitdiff
path: root/tests/setup_disk_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/setup_disk_test')
-rwxr-xr-xtests/setup_disk_test21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/setup_disk_test b/tests/setup_disk_test
index 5fcb535..0331700 100755
--- a/tests/setup_disk_test
+++ b/tests/setup_disk_test
@@ -12,7 +12,8 @@ init_tests \
setup_disk_func_uuid_or_device \
setup_disk_non_existing_block_dev \
setup_disk_install_mounted_root_nvme \
- setup_disk_install_mounted_root_efi_boot
+ setup_disk_install_mounted_root_efi_boot \
+ setup_disk_install_mounted_root_bootloader_none
setup_disk_usage_body() {
test_usage setup-disk
@@ -268,7 +269,6 @@ setup_disk_install_mounted_root_efi_boot_body() {
mkdir -p target/boot \
sys/firmware/efi
- # simulate nvme0n1p2 being mounted
fake_mount "/dev/vda2 $PWD/target ext4 rw,noatime,data=ordered 0 0"
fake_mount "/dev/vda1 $PWD/target/boot vfat rw,relatime,fmask=0022 0 0"
@@ -286,3 +286,20 @@ setup_disk_install_mounted_root_efi_boot_body() {
atf_check -o match:"GRUB_CMDLINE_LINUX_DEFAULT=.*ext4" \
cat target/etc/default/grub
}
+
+setup_disk_install_mounted_root_bootloader_none_body() {
+ init_env
+ mkdir -p target/boot \
+ sys/firmware/efi
+
+ fake_mount "/dev/vda2 $PWD/target ext4 rw,noatime,data=ordered 0 0"
+ fake_mount "/dev/vda1 $PWD/target/boot vfat rw,relatime,fmask=0022 0 0"
+
+ BOOTLOADER=none atf_check -s exit:0 \
+ -o not-match:"grub" \
+ setup-disk -v target
+
+ if [ -f target/etc/default/grub ]; then
+ atf_fail "etc/default/grub should not exist"
+ fi
+}