diff --git a/templates.fif.json b/templates.fif.json index ceee16a8..10e153b2 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -738,6 +738,7 @@ "PARTITIONING": "custom_blivet_resize_lvm", "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", "INSTALL": "1", + "POSTINSTALL": "disk_custom_resize_lvm_ext4_postinstall", "ROOT_PASSWORD": "weakpassword", "START_AFTER_TEST": "install_lvm_ext4" } @@ -752,6 +753,7 @@ "PARTITIONING": "custom_resize_lvm", "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", "INSTALL": "1", + "POSTINSTALL": "disk_custom_resize_lvm_ext4_postinstall", "ROOT_PASSWORD": "weakpassword", "START_AFTER_TEST": "install_lvm_ext4" } diff --git a/tests/disk_custom_resize_lvm_ext4_postinstall.pm b/tests/disk_custom_resize_lvm_ext4_postinstall.pm new file mode 100644 index 00000000..a1546b55 --- /dev/null +++ b/tests/disk_custom_resize_lvm_ext4_postinstall.pm @@ -0,0 +1,31 @@ +use base "installedtest"; +use strict; +use testapi; + +sub run { + assert_screen "root_console"; + my $devboot = 'vda1'; + + if (get_var('OFW') || get_var('UEFI')) { + $devboot = 'vda2'; + } + # check that lvm is present: + validate_script_output "lvdisplay | grep 'LV Status'", sub { $_ =~ m/available/ }; + + # Check that the root partition has been resized to 13 GiB. + validate_script_output "fdisk -l", sub { $_ =~ m/13 GiB/ }; + + # Check that the home partition has been created. + # We do not check for size this time, because the /home partition is created + # in the remaining space and this might vary in the future. + assert_script_run "fdisk -l | grep /home"; + +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: