diff --git a/main.pm b/main.pm index 68184a14..7c537520 100644 --- a/main.pm +++ b/main.pm @@ -56,7 +56,11 @@ else elsif (get_var('DISK_GUIDED_DELETE_PARTIAL')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_partial.pm"; } + elsif (get_var('DISK_GUIDED_MULTI_EMPTY_ALL')) { + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_empty_all.pm"; + } else { + # also DISK_GUIDED_FREE_SPACE autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_empty.pm"; } @@ -84,6 +88,9 @@ else elsif (get_var('DISK_GUIDED_FREE_SPACE')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_free_space_postinstall.pm"; } + elsif (get_var('DISK_GUIDED_MULTI_EMPTY_ALL')) { + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_empty_all_postinstall.pm"; + } } diff --git a/needles/anaconda_install_destination_select_disk_1.json b/needles/anaconda_install_destination_select_disk_1.json index 3b732b45..dce12e7b 100644 --- a/needles/anaconda_install_destination_select_disk_1.json +++ b/needles/anaconda_install_destination_select_disk_1.json @@ -1,17 +1,25 @@ { + "properties": [], "area": [ { - "xpos": 56, - "width": 134, + "ypos": 289, "type": "match", "height": 24, - "ypos": 289 + "width": 17, + "xpos": 56 + }, + { + "ypos": 288, + "type": "match", + "height": 24, + "width": 87, + "xpos": 102 } ], "tags": [ + "anaconda_install_destination_select_disk_1", "ENV-DISTRI-fedora", - "ENV-FLAVOR-server", "ENV-INSTLANG-en_US", - "anaconda_install_destination_select_disk_1" + "ENV-FLAVOR-server" ] } \ No newline at end of file diff --git a/needles/anaconda_install_destination_select_disk_2.json b/needles/anaconda_install_destination_select_disk_2.json index f6bc14af..ddcf2412 100644 --- a/needles/anaconda_install_destination_select_disk_2.json +++ b/needles/anaconda_install_destination_select_disk_2.json @@ -1,24 +1,32 @@ { - "area": [ - { - "type": "match", - "width": 73, - "height": 63, - "ypos": 178, - "xpos": 290 - }, - { - "type": "match", - "width": 137, - "height": 30, - "ypos": 275, - "xpos": 266 - } - ], "tags": [ "anaconda_install_destination_select_disk_2", "ENV-DISTRI-fedora", "ENV-INSTLANG-en_US", "ENV-FLAVOR-server" - ] + ], + "area": [ + { + "xpos": 290, + "type": "match", + "ypos": 178, + "width": 73, + "height": 63 + }, + { + "ypos": 275, + "type": "match", + "height": 23, + "width": 20, + "xpos": 266 + }, + { + "type": "match", + "ypos": 278, + "width": 81, + "height": 22, + "xpos": 317 + } + ], + "properties": [] } \ No newline at end of file diff --git a/needles/anaconda_install_destination_two_disks2.json b/needles/anaconda_install_destination_two_disks2.json new file mode 100644 index 00000000..164c38a7 --- /dev/null +++ b/needles/anaconda_install_destination_two_disks2.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_install_destination_two_disks", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "height": 46, + "width": 260, + "ypos": 216, + "type": "match", + "xpos": 59 + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_two_disks2.png b/needles/anaconda_install_destination_two_disks2.png new file mode 100644 index 00000000..c1d9b148 Binary files /dev/null and b/needles/anaconda_install_destination_two_disks2.png differ diff --git a/needles/console_two_disks_mounted_lvm.json b/needles/console_two_disks_mounted_lvm.json new file mode 100644 index 00000000..cde8afc2 --- /dev/null +++ b/needles/console_two_disks_mounted_lvm.json @@ -0,0 +1,25 @@ +{ + "area": [ + { + "xpos": 191, + "ypos": 15, + "width": 64, + "height": 18, + "type": "match" + }, + { + "xpos": 189, + "ypos": 193, + "width": 67, + "height": 13, + "type": "match" + } + ], + "tags": [ + "console_two_disks_mounted_lvm", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/console_two_disks_mounted_lvm.png b/needles/console_two_disks_mounted_lvm.png new file mode 100644 index 00000000..8af5ec66 Binary files /dev/null and b/needles/console_two_disks_mounted_lvm.png differ diff --git a/templates b/templates index 04179ca5..e305fff5 100755 --- a/templates +++ b/templates @@ -106,6 +106,16 @@ }, test_suite => { name => "server_simple_free_space" }, }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "server", + version => "rawhide", + }, + test_suite => { name => "server_multi_empty" }, + }, ], Machines => [ { @@ -233,5 +243,15 @@ ], variables => "", }, + { + name => "server_multi_empty", + prio => 12, + settings => [ + { key => "DISK_GUIDED_MULTI_EMPTY_ALL", value => "1" }, + { key => "NUMDISKS", value => "2" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, ], } diff --git a/tests/disk_guided_multi_empty_all.pm b/tests/disk_guided_multi_empty_all.pm new file mode 100644 index 00000000..90e43ee8 --- /dev/null +++ b/tests/disk_guided_multi_empty_all.pm @@ -0,0 +1,32 @@ +use base "anacondalog"; +use strict; +use testapi; + +sub run { + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + + # Select the first disk + assert_and_click "anaconda_main_hub_install_destination"; + + assert_screen "anaconda_install_destination_two_disks"; + assert_and_click "anaconda_install_destination_select_disk_1"; + assert_and_click "anaconda_install_destination_select_disk_2"; + assert_and_click "anaconda_spoke_done"; + + # 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_multi_empty_all_postinstall.pm b/tests/disk_guided_multi_empty_all_postinstall.pm new file mode 100644 index 00000000..252a07a9 --- /dev/null +++ b/tests/disk_guided_multi_empty_all_postinstall.pm @@ -0,0 +1,24 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + assert_screen "root_logged_in"; + + # when two disks are selected in installation, LVM is used + type_string "reset; pvdisplay"; + send_key "ret"; + assert_screen "console_two_disks_mounted_lvm"; +} + +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: