diff --git a/main.pm b/main.pm index 94ffffbf..999cf50d 100644 --- a/main.pm +++ b/main.pm @@ -53,6 +53,9 @@ else 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')) { + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_partial.pm"; + } else { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_empty.pm"; } @@ -76,6 +79,11 @@ else { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_postinstall.pm"; } + + if (get_var('DISK_GUIDED_DELETE_PARTIAL')) + { + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_partial_postinstall.pm"; + } } diff --git a/needles/anaconda_install_destination_reclaim_space_delete_btn.json b/needles/anaconda_install_destination_reclaim_space_delete_btn.json new file mode 100644 index 00000000..8aa82d15 --- /dev/null +++ b/needles/anaconda_install_destination_reclaim_space_delete_btn.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_install_destination_reclaim_space_delete_btn", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 108, + "ypos": 517, + "width": 46, + "height": 21, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_reclaim_space_delete_btn.png b/needles/anaconda_install_destination_reclaim_space_delete_btn.png new file mode 100644 index 00000000..88e67c83 Binary files /dev/null and b/needles/anaconda_install_destination_reclaim_space_delete_btn.png differ diff --git a/needles/anaconda_install_destination_reclaim_space_first_partition.json b/needles/anaconda_install_destination_reclaim_space_first_partition.json new file mode 100644 index 00000000..54313c5f --- /dev/null +++ b/needles/anaconda_install_destination_reclaim_space_first_partition.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 15, + "ypos": 278, + "width": 70, + "height": 24, + "type": "match" + } + ], + "tags": [ + "anaconda_install_destination_reclaim_space_first_partition", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_reclaim_space_first_partition.png b/needles/anaconda_install_destination_reclaim_space_first_partition.png new file mode 100644 index 00000000..5e88d66c Binary files /dev/null and b/needles/anaconda_install_destination_reclaim_space_first_partition.png differ diff --git a/needles/anaconda_install_destination_reclaim_space_second_partition.json b/needles/anaconda_install_destination_reclaim_space_second_partition.json new file mode 100644 index 00000000..d93d7e46 --- /dev/null +++ b/needles/anaconda_install_destination_reclaim_space_second_partition.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 11, + "ypos": 301, + "width": 75, + "height": 25, + "type": "match" + } + ], + "tags": [ + "anaconda_install_destination_reclaim_space_second_partition", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_reclaim_space_second_partition.png b/needles/anaconda_install_destination_reclaim_space_second_partition.png new file mode 100644 index 00000000..5e88d66c Binary files /dev/null and b/needles/anaconda_install_destination_reclaim_space_second_partition.png differ diff --git a/templates b/templates index d4f35f73..63945e1e 100755 --- a/templates +++ b/templates @@ -112,5 +112,15 @@ ], variables => "", }, + { + name => "server_delete_partial", + prio => 9, + settings => [ + { key => "DISK_GUIDED_DELETE_PARTIAL", value => "1" }, + { key => "HDD_1", value => "disk_full.img" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, ], } diff --git a/tests/disk_guided_delete_partial.pm b/tests/disk_guided_delete_partial.pm new file mode 100644 index 00000000..71d03ac1 --- /dev/null +++ b/tests/disk_guided_delete_partial.pm @@ -0,0 +1,38 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + + # Select the first disk, it should be full + assert_and_click "anaconda_main_hub_install_destination"; + + assert_and_click "anaconda_spoke_done"; + + # Provided disk should be full + assert_and_click "anaconda_install_destination_reclaim_space_btn"; + + assert_and_click "anaconda_install_destination_reclaim_space_first_partition"; + + assert_and_click "anaconda_install_destination_reclaim_space_delete_btn"; + + assert_and_click "anaconda_install_destination_reclaim_space_btn"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + +} + +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: diff --git a/tests/disk_guided_delete_partial_postinstall.pm b/tests/disk_guided_delete_partial_postinstall.pm new file mode 100644 index 00000000..7733d843 --- /dev/null +++ b/tests/disk_guided_delete_partial_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/vda2 /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: