diff --git a/main.pm b/main.pm index 7c537520..731d8352 100644 --- a/main.pm +++ b/main.pm @@ -59,6 +59,9 @@ else elsif (get_var('DISK_GUIDED_MULTI_EMPTY_ALL')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_empty_all.pm"; } + elsif (get_var('DISK_SOFTWARE_RAID')) { + autotest::loadtest get_var('CASEDIR')."/tests/disk_part_software_raid.pm"; + } else { # also DISK_GUIDED_FREE_SPACE autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_empty.pm"; @@ -91,6 +94,9 @@ else elsif (get_var('DISK_GUIDED_MULTI_EMPTY_ALL')) { autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_empty_all_postinstall.pm"; } + elsif (get_var('DISK_SOFTWARE_RAID')) { + autotest::loadtest get_var('CASEDIR')."/tests/disk_part_software_raid_postinstall.pm"; + } } diff --git a/needles/anaconda_main_hub_installdest_selected.json b/needles/anaconda_main_hub_installdest_selected.json new file mode 100644 index 00000000..89869bf8 --- /dev/null +++ b/needles/anaconda_main_hub_installdest_selected.json @@ -0,0 +1,60 @@ +{ + "tags": [ + "anaconda_main_hub", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 168, + "ypos": 7, + "type": "match", + "height": 57, + "width": 227 + }, + { + "xpos": 266, + "width": 101, + "height": 33, + "type": "match", + "ypos": 153 + }, + { + "width": 180, + "height": 33, + "type": "match", + "ypos": 155, + "xpos": 699 + }, + { + "width": 203, + "height": 38, + "type": "match", + "ypos": 346, + "xpos": 267 + }, + { + "xpos": 264, + "ypos": 475, + "type": "match", + "height": 50, + "width": 252 + }, + { + "height": 18, + "width": 36, + "ypos": 236, + "type": "match", + "xpos": 272 + }, + { + "type": "match", + "ypos": 240, + "width": 40, + "height": 13, + "xpos": 330 + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_main_hub_installdest_selected.png b/needles/anaconda_main_hub_installdest_selected.png new file mode 100644 index 00000000..9645533b Binary files /dev/null and b/needles/anaconda_main_hub_installdest_selected.png differ diff --git a/needles/anaconda_manual_partitioning.json b/needles/anaconda_manual_partitioning.json new file mode 100644 index 00000000..282d1ad1 --- /dev/null +++ b/needles/anaconda_manual_partitioning.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "tags": [ + "anaconda_manual_partitioning", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 295, + "ypos": 521, + "width": 162, + "height": 20, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_manual_partitioning.png b/needles/anaconda_manual_partitioning.png new file mode 100644 index 00000000..93e3cbc0 Binary files /dev/null and b/needles/anaconda_manual_partitioning.png differ diff --git a/needles/anaconda_part_accept_changes.json b/needles/anaconda_part_accept_changes.json new file mode 100644 index 00000000..50df22f7 --- /dev/null +++ b/needles/anaconda_part_accept_changes.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "tags": [ + "anaconda_part_accept_changes", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 760, + "ypos": 550, + "width": 122, + "height": 21, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_accept_changes.png b/needles/anaconda_part_accept_changes.png new file mode 100644 index 00000000..ba9e20f5 Binary files /dev/null and b/needles/anaconda_part_accept_changes.png differ diff --git a/needles/anaconda_part_add_mountpoint.json b/needles/anaconda_part_add_mountpoint.json new file mode 100644 index 00000000..a3d57468 --- /dev/null +++ b/needles/anaconda_part_add_mountpoint.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "area": [ + { + "xpos": 545, + "ypos": 461, + "width": 118, + "height": 26, + "type": "match" + } + ], + "tags": [ + "anaconda_part_add_mountpoint", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_add_mountpoint.png b/needles/anaconda_part_add_mountpoint.png new file mode 100644 index 00000000..9b7e25a0 Binary files /dev/null and b/needles/anaconda_part_add_mountpoint.png differ diff --git a/needles/anaconda_part_desired_capacity.json b/needles/anaconda_part_desired_capacity.json new file mode 100644 index 00000000..bb34e958 --- /dev/null +++ b/needles/anaconda_part_desired_capacity.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 351, + "ypos": 406, + "width": 304, + "height": 21, + "type": "match" + } + ], + "tags": [ + "anaconda_part_desired_capacity", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_part_desired_capacity.png b/needles/anaconda_part_desired_capacity.png new file mode 100644 index 00000000..78d516a6 Binary files /dev/null and b/needles/anaconda_part_desired_capacity.png differ diff --git a/needles/anaconda_part_device_type.json b/needles/anaconda_part_device_type.json new file mode 100644 index 00000000..737f2a0e --- /dev/null +++ b/needles/anaconda_part_device_type.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "tags": [ + "anaconda_part_device_type", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 376, + "ypos": 296, + "width": 144, + "height": 49, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_device_type.png b/needles/anaconda_part_device_type.png new file mode 100644 index 00000000..b5976025 Binary files /dev/null and b/needles/anaconda_part_device_type.png differ diff --git a/needles/anaconda_part_list_box_boot.json b/needles/anaconda_part_list_box_boot.json new file mode 100644 index 00000000..4b54a54f --- /dev/null +++ b/needles/anaconda_part_list_box_boot.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_part_list_box_boot", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 471, + "ypos": 433, + "width": 63, + "height": 28, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_part_list_box_boot.png b/needles/anaconda_part_list_box_boot.png new file mode 100644 index 00000000..30199c5b Binary files /dev/null and b/needles/anaconda_part_list_box_boot.png differ diff --git a/needles/anaconda_part_list_box_button.json b/needles/anaconda_part_list_box_button.json new file mode 100644 index 00000000..01b38027 --- /dev/null +++ b/needles/anaconda_part_list_box_button.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "tags": [ + "anaconda_part_list_box_button", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 640, + "ypos": 372, + "width": 27, + "height": 22, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_list_box_button.png b/needles/anaconda_part_list_box_button.png new file mode 100644 index 00000000..3a4b3301 Binary files /dev/null and b/needles/anaconda_part_list_box_button.png differ diff --git a/needles/anaconda_part_list_box_root.json b/needles/anaconda_part_list_box_root.json new file mode 100644 index 00000000..8836068d --- /dev/null +++ b/needles/anaconda_part_list_box_root.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "tags": [ + "anaconda_part_list_box_root", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 472, + "ypos": 405, + "width": 66, + "height": 26, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_list_box_root.png b/needles/anaconda_part_list_box_root.png new file mode 100644 index 00000000..02e87deb Binary files /dev/null and b/needles/anaconda_part_list_box_root.png differ diff --git a/needles/anaconda_part_list_box_swap.json b/needles/anaconda_part_list_box_swap.json new file mode 100644 index 00000000..52d21000 --- /dev/null +++ b/needles/anaconda_part_list_box_swap.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "area": [ + { + "xpos": 472, + "ypos": 498, + "width": 91, + "height": 24, + "type": "match" + } + ], + "tags": [ + "anaconda_part_list_box_swap", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_list_box_swap.png b/needles/anaconda_part_list_box_swap.png new file mode 100644 index 00000000..7d47ea64 Binary files /dev/null and b/needles/anaconda_part_list_box_swap.png differ diff --git a/needles/anaconda_part_plus_button.json b/needles/anaconda_part_plus_button.json new file mode 100644 index 00000000..0b0343f4 --- /dev/null +++ b/needles/anaconda_part_plus_button.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_part_plus_button", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 32, + "ypos": 624, + "width": 35, + "height": 31, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_part_plus_button.png b/needles/anaconda_part_plus_button.png new file mode 100644 index 00000000..084b7c62 Binary files /dev/null and b/needles/anaconda_part_plus_button.png differ diff --git a/needles/anaconda_part_raid_list.json b/needles/anaconda_part_raid_list.json new file mode 100644 index 00000000..de60bd9c --- /dev/null +++ b/needles/anaconda_part_raid_list.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "area": [ + { + "xpos": 378, + "ypos": 351, + "width": 68, + "height": 23, + "type": "match" + } + ], + "tags": [ + "anaconda_part_raid_list", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_raid_list.png b/needles/anaconda_part_raid_list.png new file mode 100644 index 00000000..2af99c01 Binary files /dev/null and b/needles/anaconda_part_raid_list.png differ diff --git a/needles/anaconda_part_update_settings.json b/needles/anaconda_part_update_settings.json new file mode 100644 index 00000000..b62aa2f3 --- /dev/null +++ b/needles/anaconda_part_update_settings.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "tags": [ + "anaconda_part_update_settings", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 879, + "ypos": 571, + "width": 112, + "height": 23, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_update_settings.png b/needles/anaconda_part_update_settings.png new file mode 100644 index 00000000..1f73d9d6 Binary files /dev/null and b/needles/anaconda_part_update_settings.png differ diff --git a/needles/console_raid_used.json b/needles/console_raid_used.json new file mode 100644 index 00000000..4a6030b7 --- /dev/null +++ b/needles/console_raid_used.json @@ -0,0 +1,18 @@ +{ + "properties": [], + "area": [ + { + "xpos": 0, + "ypos": 0, + "width": 182, + "height": 15, + "type": "match" + } + ], + "tags": [ + "console_raid_used", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/console_raid_used.png b/needles/console_raid_used.png new file mode 100644 index 00000000..7c9e97b4 Binary files /dev/null and b/needles/console_raid_used.png differ diff --git a/templates b/templates index e305fff5..cd84926d 100755 --- a/templates +++ b/templates @@ -116,6 +116,16 @@ }, test_suite => { name => "server_multi_empty" }, }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "server", + version => "rawhide", + }, + test_suite => { name => "server_software_raid" }, + }, ], Machines => [ { @@ -253,5 +263,15 @@ ], variables => "", }, + { + name => "server_software_raid", + prio => 13, + settings => [ + { key => "DISK_SOFTWARE_RAID", 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 index 90e43ee8..44534c0f 100644 --- a/tests/disk_guided_multi_empty_all.pm +++ b/tests/disk_guided_multi_empty_all.pm @@ -6,9 +6,9 @@ sub run { # Anaconda hub assert_screen "anaconda_main_hub", 300; # - # Select the first disk assert_and_click "anaconda_main_hub_install_destination"; + # Select both disks for installation 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"; diff --git a/tests/disk_part_software_raid.pm b/tests/disk_part_software_raid.pm new file mode 100644 index 00000000..c8c61a9d --- /dev/null +++ b/tests/disk_part_software_raid.pm @@ -0,0 +1,73 @@ +use base "anacondalog"; +use strict; +use testapi; + +sub run { + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + + assert_and_click "anaconda_main_hub_install_destination"; + + # Select both disks for installation + 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"; + + # Select manual partitioning + assert_and_click "anaconda_manual_partitioning"; + + assert_and_click "anaconda_spoke_done"; + + # Manual partitioning spoke should be displayed + + # Add /boot partition + assert_and_click "anaconda_part_plus_button"; + assert_and_click "anaconda_part_list_box_button"; + assert_and_click "anaconda_part_list_box_boot"; + assert_and_click "anaconda_part_desired_capacity"; + + type_string "200M"; + + assert_and_click "anaconda_part_add_mountpoint"; + + # Add swap partition + assert_and_click "anaconda_part_plus_button"; + assert_and_click "anaconda_part_list_box_button"; + assert_and_click "anaconda_part_list_box_swap"; + assert_and_click "anaconda_part_desired_capacity"; + + type_string "2G"; + + assert_and_click "anaconda_part_add_mountpoint"; + + # Add root partition + assert_and_click "anaconda_part_plus_button"; + assert_and_click "anaconda_part_list_box_button"; + assert_and_click "anaconda_part_list_box_root"; + + assert_and_click "anaconda_part_add_mountpoint"; + + # Change type to RAID + assert_and_click "anaconda_part_device_type"; + assert_and_click "anaconda_part_raid_list"; + assert_and_click "anaconda_part_update_settings"; + + assert_and_click "anaconda_spoke_done"; + assert_and_click "anaconda_part_accept_changes"; + + # 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_part_software_raid_postinstall.pm b/tests/disk_part_software_raid_postinstall.pm new file mode 100644 index 00000000..eb1b9712 --- /dev/null +++ b/tests/disk_part_software_raid_postinstall.pm @@ -0,0 +1,22 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + assert_screen "root_logged_in"; + type_string "reset; cat /proc/mdstat"; + send_key "ret"; + assert_screen "console_raid_used"; +} + +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: