diff --git a/main.pm b/main.pm index 999cf50d..68184a14 100644 --- a/main.pm +++ b/main.pm @@ -47,10 +47,10 @@ else ## Disk partitioning - if (get_var('DISK_GUIDED_MULTI')){ + if (get_var('DISK_GUIDED_MULTI')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi.pm"; } - elsif (get_var('DISK_GUIDED_DELETE_ALL')){ + elsif (get_var('DISK_GUIDED_DELETE_ALL')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_all.pm"; } elsif (get_var('DISK_GUIDED_DELETE_PARTIAL')) { @@ -75,15 +75,15 @@ else } autotest::loadtest get_var('CASEDIR')."/tests/_wait_for_login_screen.pm"; - if (get_var('DISK_GUIDED_MULTI')) - { + if (get_var('DISK_GUIDED_MULTI')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_postinstall.pm"; } - - if (get_var('DISK_GUIDED_DELETE_PARTIAL')) - { + elsif (get_var('DISK_GUIDED_DELETE_PARTIAL')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_partial_postinstall.pm"; } + elsif (get_var('DISK_GUIDED_FREE_SPACE')) { + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_free_space_postinstall.pm"; + } } diff --git a/templates b/templates index 6af7e159..04179ca5 100755 --- a/templates +++ b/templates @@ -96,6 +96,16 @@ }, test_suite => { name => "server_simple_encrypted" }, }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "server", + version => "rawhide", + }, + test_suite => { name => "server_simple_free_space" }, + }, ], Machines => [ { @@ -207,11 +217,21 @@ }, { name => "server_simple_encrypted", - prio => 9, + prio => 10, settings => [ { key => "ENCRYPT_PASSWORD", value => "weakpassword" }, ], variables => "", }, + { + name => "server_simple_free_space", + prio => 11, + settings => [ + { key => "DISK_GUIDED_FREE_SPACE", value => "1" }, + { key => "HDD_1", value => "disk_freespace.img" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, ], } diff --git a/tests/disk_guided_free_space_postinstall.pm b/tests/disk_guided_free_space_postinstall.pm new file mode 100644 index 00000000..c81b5f73 --- /dev/null +++ b/tests/disk_guided_free_space_postinstall.pm @@ -0,0 +1,25 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + assert_screen "root_logged_in"; + type_string "reset; mount /dev/vda1 /mnt; echo $?"; + send_key "ret"; + assert_screen "console_command_success"; + type_string "reset; cat /mnt/testfile"; + send_key "ret"; + assert_screen "provided_disk_intact"; +} + +sub test_flags { + # without anything - rollback to 'lastgood' snapshot if failed + # 'fatal' - whole test suite is in danger if this fails + # 'milestone' - after this test succeeds, update 'lastgood' + # 'important' - if this fails, set the overall state to 'fail' + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: