diff --git a/needles/anaconda_install_destination_reclaim_space_first_partition_ntfs.json b/needles/anaconda_install_destination_reclaim_space_first_partition_ntfs.json new file mode 100644 index 00000000..c7e480f5 --- /dev/null +++ b/needles/anaconda_install_destination_reclaim_space_first_partition_ntfs.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "width": 70, + "type": "match", + "ypos": 278, + "xpos": 15, + "height": 24 + } + ], + "tags": [ + "anaconda_install_destination_reclaim_space_first_partition", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-universal" + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_reclaim_space_first_partition_ntfs.png b/needles/anaconda_install_destination_reclaim_space_first_partition_ntfs.png new file mode 100644 index 00000000..067496ec Binary files /dev/null and b/needles/anaconda_install_destination_reclaim_space_first_partition_ntfs.png differ diff --git a/needles/anaconda_install_destination_reclaim_space_shrink_btn.json b/needles/anaconda_install_destination_reclaim_space_shrink_btn.json new file mode 100644 index 00000000..7bdb1b0c --- /dev/null +++ b/needles/anaconda_install_destination_reclaim_space_shrink_btn.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_install_destination_reclaim_space_shrink_btn", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-develop" + ], + "area": [ + { + "xpos": 172, + "ypos": 515, + "width": 61, + "height": 22, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_reclaim_space_shrink_btn.png b/needles/anaconda_install_destination_reclaim_space_shrink_btn.png new file mode 100644 index 00000000..9ca8a34d Binary files /dev/null and b/needles/anaconda_install_destination_reclaim_space_shrink_btn.png differ diff --git a/needles/anaconda_install_destination_reclaim_space_shrink_slider.json b/needles/anaconda_install_destination_reclaim_space_shrink_slider.json new file mode 100644 index 00000000..f1040321 --- /dev/null +++ b/needles/anaconda_install_destination_reclaim_space_shrink_slider.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "ENV-DISTRI-fedora", + "ENV-FLAVOR-develop", + "ENV-INSTLANG-en_US", + "anaconda_install_destination_reclaim_space_shrink_slider" + ], + "area": [ + { + "xpos": 14, + "ypos": 477, + "width": 209, + "height": 35, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_reclaim_space_shrink_slider.png b/needles/anaconda_install_destination_reclaim_space_shrink_slider.png new file mode 100644 index 00000000..d1304fca Binary files /dev/null and b/needles/anaconda_install_destination_reclaim_space_shrink_slider.png differ diff --git a/templates b/templates index 33f88150..f7d9dbc9 100755 --- a/templates +++ b/templates @@ -246,6 +246,26 @@ }, test_suite => { name => "server_updates_img_local" }, }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_shrink_ext4" }, + }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_shrink_ntfs" }, + }, { machine => { name => "32bit" }, product => { @@ -826,7 +846,7 @@ }, { name => "server_updates_img_local", - prio => 20, + prio => 21, settings => [ { key => "NUMDISKS", value => "2" }, { key => "HDD_2", value => "disk_updates_img.img" }, @@ -835,5 +855,25 @@ ], variables => "", }, + { + name => "server_shrink_ext4", + prio => 22, + settings => [ + { key => "ROOT_PASSWORD", value => "weakpassword" }, + { key => "HDD_1", value => "disk_shrink_ext4.img" }, + { key => "PARTITIONING", value => "guided_shrink" }, + ], + variables => "", + }, + { + name => "server_shrink_ntfs", + prio => 23, + settings => [ + { key => "ROOT_PASSWORD", value => "weakpassword" }, + { key => "HDD_1", value => "disk_shrink_ntfs.img" }, + { key => "PARTITIONING", value => "guided_shrink" }, + ], + variables => "", + }, ], } diff --git a/tests/disk_guided_shrink.pm b/tests/disk_guided_shrink.pm new file mode 100644 index 00000000..2b50286c --- /dev/null +++ b/tests/disk_guided_shrink.pm @@ -0,0 +1,39 @@ +use base "anacondatest"; +use strict; +use testapi; + +sub run { + my $self = shift; + # Anaconda hub + # Go to INSTALLATION DESTINATION and ensure one disk is selected. + $self->select_disks(); + assert_and_click "anaconda_spoke_done"; + + # the only provided disk should be automatically selected and full + assert_and_click "anaconda_install_destination_reclaim_space_btn"; + + # select first partition + assert_and_click "anaconda_install_destination_reclaim_space_first_partition"; + + # shrink partition + assert_and_click "anaconda_install_destination_reclaim_space_shrink_btn"; + assert_and_click "anaconda_install_destination_reclaim_space_shrink_slider"; + + 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_shrink_postinstall.pm b/tests/disk_guided_shrink_postinstall.pm new file mode 100644 index 00000000..bf0846bb --- /dev/null +++ b/tests/disk_guided_shrink_postinstall.pm @@ -0,0 +1,26 @@ +use base "installedtest"; +use strict; +use testapi; + +sub run { + assert_screen "root_console"; + # mount first partition and check that it's intact + 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: