diff --git a/lib/anacondatest.pm b/lib/anacondatest.pm index ba89496e..5b0d8989 100644 --- a/lib/anacondatest.pm +++ b/lib/anacondatest.pm @@ -129,6 +129,13 @@ sub custom_change_fs { assert_and_click "anaconda_part_update_settings"; } +sub custom_delete_part { + my ($self, $part) = @_; + return if not $part; + assert_and_click "anaconda_part_select_$part"; + assert_and_click "anaconda_part_delete"; +} + 1; # vim: set sw=4 et: diff --git a/needles/anaconda_part_delete.json b/needles/anaconda_part_delete.json new file mode 100644 index 00000000..0450c677 --- /dev/null +++ b/needles/anaconda_part_delete.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "width": 55, + "xpos": 65, + "ypos": 625 + } + ], + "tags": [ + "anaconda_part_delete", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-generic_boot" + ] +} diff --git a/needles/anaconda_part_delete.png b/needles/anaconda_part_delete.png new file mode 100644 index 00000000..a460ab3f Binary files /dev/null and b/needles/anaconda_part_delete.png differ diff --git a/needles/anaconda_part_select_swap.json b/needles/anaconda_part_select_swap.json new file mode 100644 index 00000000..d0106152 --- /dev/null +++ b/needles/anaconda_part_select_swap.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "height": 19, + "type": "match", + "width": 48, + "xpos": 51, + "ypos": 245 + } + ], + "properties": [], + "tags": [ + "anaconda_part_select_swap", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-generic_boot" + ] +} diff --git a/needles/anaconda_part_select_swap.png b/needles/anaconda_part_select_swap.png new file mode 100644 index 00000000..350952ea Binary files /dev/null and b/needles/anaconda_part_select_swap.png differ diff --git a/templates b/templates index 0f3c6737..087c21ad 100755 --- a/templates +++ b/templates @@ -196,6 +196,16 @@ }, test_suite => { name => "server_lvmthin" }, }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_no_swap" }, + }, { machine => { name => "64bit" }, product => { @@ -426,6 +436,16 @@ }, test_suite => { name => "server_lvmthin" }, }, + { + machine => { name => "32bit" }, + product => { + arch => "i386", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_no_swap" }, + }, { machine => { name => "32bit" }, product => { @@ -738,8 +758,17 @@ variables => "", }, { - name => "server_kickstart_hdd", + name => "server_no_swap", prio => 17, + settings => [ + { key => "PARTITIONING", value => "custom_no_swap" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, + { + name => "server_kickstart_hdd", + prio => 18, settings => [ { key => "KICKSTART", value => "1" }, { key => "GRUB", value => "inst.ks=hd:vdb1:/root-user-crypted-net.ks" }, @@ -753,7 +782,7 @@ }, { name => "fedup_minimal", - prio => 18, + prio => 19, settings => [ { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "BOOTFROM", value => "c" }, @@ -764,7 +793,7 @@ }, { name => "fedup_desktop", - prio => 19, + prio => 20, settings => [ { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "BOOTFROM", value => "c" }, diff --git a/tests/disk_custom_no_swap.pm b/tests/disk_custom_no_swap.pm new file mode 100644 index 00000000..8f0f8868 --- /dev/null +++ b/tests/disk_custom_no_swap.pm @@ -0,0 +1,35 @@ +use base "anacondatest"; +use strict; +use testapi; + +sub run { + my $self = shift; + # Go to INSTALLATION DESTINATION and ensure the disk is selected. + # Because PARTITIONING starts with 'custom_', this will select custom. + $self->select_disks(); + assert_and_click "anaconda_spoke_done"; + + # Manual partitioning spoke should be displayed + assert_and_click "anaconda_part_automatic"; + $self->custom_delete_part('swap'); + assert_and_click "anaconda_spoke_done"; + # Deleting swap shows a warning and requires a second click to confirm + 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: