diff --git a/VARIABLES.md b/VARIABLES.md index fad613bb..32171af8 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -61,7 +61,7 @@ it also means that `B` conflicts `A` even if not shown in the table). | `MIRRORLIST_GRAPHICAL` | boolean | `false`/not set | `REPOSITORY_GRAPHICAL` | sets installation source to mirrorlist | | `REPOSITORY_GRAPHICAL` | url to repository (without arch and `/os`, for example `http://dl.fedoraproject.org/pub/fedora/linux/development`) | not set | `MIRRORLIST_GRAPHICAL` | sets installation source to repository url in Anaconda | | `REPOSITORY_VARIATION` | url to repository (without arch and `/os`, for example `http://dl.fedoraproject.org/pub/fedora/linux/development`) | not set | nothing | sets installation source to repository url in GRUB | -| `PARTITIONING` | string (`custom_software_raid`, `guided_delete_all`, ...) | `guided_empty` | nothing | load specified test for partitioning part (when `PARTITIONING=guided_delete_all`, `tests/disk_guided_empty_all.pm` is loaded) | +| `PARTITIONING` | string (`custom_software_raid`, `guided_delete_all`, ...) | `guided_empty` | nothing | load specified test for partitioning part (when `PARTITIONING=guided_delete_all`, `tests/disk_guided_delete_all.pm` is loaded) and optionally post-install partitioning check (if `tests/disk_guided_delete_all_postinstall.pm` exists, it will be loaded after login to the installed system). Also, if value starts with `custom_`, the `select_disks()` method will check the custom partitioning box | | `ENCRYPT_PASSWORD` | string | not set | nothing | if set, encrypt disk with given password | | `DESKTOP` | boolean | `false`/not set | nothing | set to indicate that Fedora is running with GUI (so for example OpenQA should expect graphical login screen) | | `ROOT_PASSWORD` | string | `weakpassword` | nothing | root password is set to this value | diff --git a/lib/anacondatest.pm b/lib/anacondatest.pm index 7f3c94eb..b73e38c1 100644 --- a/lib/anacondatest.pm +++ b/lib/anacondatest.pm @@ -90,22 +90,43 @@ sub select_disks { } # For exactly 1 disk, we don't need to do anything. } + + # If this is a custom partitioning test, select custom partitioning. + if (get_var('PARTITIONING') =~ /^custom_/) { + assert_and_click "anaconda_manual_partitioning"; + } } sub custom_scheme_select { my ($self, $scheme) = @_; assert_and_click "anaconda_part_scheme"; + # Move the mouse away from the menu + mouse_set(10, 10); assert_and_click "anaconda_part_scheme_$scheme"; } sub custom_change_type { - my ($self, $type) = @_; - # We assume we start off with / selected. + my ($self, $type, $part) = @_; + $part ||= "root"; + assert_and_click "anaconda_part_select_$part"; assert_and_click "anaconda_part_device_type"; + # Move the mouse away from the menu + mouse_set(10, 10); assert_and_click "anaconda_part_device_type_$type"; assert_and_click "anaconda_part_update_settings"; } +sub custom_change_fs { + my ($self, $fs, $part) = @_; + $part ||= "root"; + assert_and_click "anaconda_part_select_$part"; + assert_and_click "anaconda_part_fs"; + # Move the mouse away from the menu + mouse_set(10, 10); + assert_and_click "anaconda_part_fs_$fs"; + assert_and_click "anaconda_part_update_settings"; +} + 1; # vim: set sw=4 et: diff --git a/needles/anaconda_part_fs_ext3.json b/needles/anaconda_part_fs_ext3.json new file mode 100644 index 00000000..d885be56 --- /dev/null +++ b/needles/anaconda_part_fs_ext3.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 16, + "type": "match", + "width": 34, + "xpos": 376, + "ypos": 351 + } + ], + "tags": [ + "anaconda_part_fs_ext3", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_fs_ext3.png b/needles/anaconda_part_fs_ext3.png new file mode 100644 index 00000000..1086ec54 Binary files /dev/null and b/needles/anaconda_part_fs_ext3.png differ diff --git a/needles/anaconda_part_fs_ext4_preselected.json b/needles/anaconda_part_fs_ext4_preselected.json new file mode 100644 index 00000000..c1d45eb3 --- /dev/null +++ b/needles/anaconda_part_fs_ext4_preselected.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 56, + "type": "match", + "width": 79, + "xpos": 371, + "ypos": 356 + } + ], + "tags": [ + "anaconda_part_fs", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_fs_ext4_preselected.png b/needles/anaconda_part_fs_ext4_preselected.png new file mode 100644 index 00000000..99c1a23b Binary files /dev/null and b/needles/anaconda_part_fs_ext4_preselected.png differ diff --git a/needles/anaconda_part_fs_xfs_preselected.json b/needles/anaconda_part_fs_xfs_preselected.json new file mode 100644 index 00000000..c1d45eb3 --- /dev/null +++ b/needles/anaconda_part_fs_xfs_preselected.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 56, + "type": "match", + "width": 79, + "xpos": 371, + "ypos": 356 + } + ], + "tags": [ + "anaconda_part_fs", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_fs_xfs_preselected.png b/needles/anaconda_part_fs_xfs_preselected.png new file mode 100644 index 00000000..c8ed9445 Binary files /dev/null and b/needles/anaconda_part_fs_xfs_preselected.png differ diff --git a/needles/anaconda_part_scheme.json b/needles/anaconda_part_scheme.json index 31b29ee4..c66ff063 100644 --- a/needles/anaconda_part_scheme.json +++ b/needles/anaconda_part_scheme.json @@ -1,17 +1,17 @@ { "area": [ { - "height": 17, + "height": 41, "type": "match", - "width": 244, - "xpos": 71, - "ypos": 178 + "width": 79, + "xpos": 46, + "ypos": 291 } ], "tags": [ - "anaconda_part_automatic", - "ENV-DISTRI-fedora", - "ENV-INSTLANG-en_US", - "ENV-FLAVOR-server" + "anaconda_part_scheme", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" ] -} +} \ No newline at end of file diff --git a/needles/anaconda_part_scheme_btrfs.json b/needles/anaconda_part_scheme_btrfs.json new file mode 100644 index 00000000..9f858943 --- /dev/null +++ b/needles/anaconda_part_scheme_btrfs.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "width": 40, + "xpos": 60, + "ypos": 270 + } + ], + "tags": [ + "anaconda_part_scheme_btrfs", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} diff --git a/needles/anaconda_part_scheme_btrfs.png b/needles/anaconda_part_scheme_btrfs.png new file mode 100644 index 00000000..dda82fd2 Binary files /dev/null and b/needles/anaconda_part_scheme_btrfs.png differ diff --git a/needles/anaconda_part_scheme_lvm.json b/needles/anaconda_part_scheme_lvm.json new file mode 100644 index 00000000..333c2a55 --- /dev/null +++ b/needles/anaconda_part_scheme_lvm.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "width": 35, + "xpos": 60, + "ypos": 300 + } + ], + "tags": [ + "anaconda_part_scheme_lvm", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_scheme_lvm.png b/needles/anaconda_part_scheme_lvm.png new file mode 100644 index 00000000..dda82fd2 Binary files /dev/null and b/needles/anaconda_part_scheme_lvm.png differ diff --git a/needles/anaconda_part_scheme_lvmthin.json b/needles/anaconda_part_scheme_lvmthin.json new file mode 100644 index 00000000..28108a13 --- /dev/null +++ b/needles/anaconda_part_scheme_lvmthin.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "width": 140, + "xpos": 60, + "ypos": 330 + } + ], + "tags": [ + "anaconda_part_scheme_lvmthin", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_scheme_lvmthin.png b/needles/anaconda_part_scheme_lvmthin.png new file mode 100644 index 00000000..dda82fd2 Binary files /dev/null and b/needles/anaconda_part_scheme_lvmthin.png differ diff --git a/needles/anaconda_part_scheme_standard.json b/needles/anaconda_part_scheme_standard.json new file mode 100644 index 00000000..24edf629 --- /dev/null +++ b/needles/anaconda_part_scheme_standard.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "width": 115, + "xpos": 60, + "ypos": 240 + } + ], + "tags": [ + "anaconda_part_scheme_standard", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_scheme_standard.png b/needles/anaconda_part_scheme_standard.png new file mode 100644 index 00000000..dda82fd2 Binary files /dev/null and b/needles/anaconda_part_scheme_standard.png differ diff --git a/needles/anaconda_part_select_root.json b/needles/anaconda_part_select_root.json new file mode 100644 index 00000000..602dfa3a --- /dev/null +++ b/needles/anaconda_part_select_root.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 21, + "type": "match", + "width": 79, + "xpos": 41, + "ypos": 197 + } + ], + "tags": [ + "anaconda_part_select_root", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_select_root.png b/needles/anaconda_part_select_root.png new file mode 100644 index 00000000..7b93d89d Binary files /dev/null and b/needles/anaconda_part_select_root.png differ diff --git a/needles/anaconda_part_select_root_already_selected.json b/needles/anaconda_part_select_root_already_selected.json new file mode 100644 index 00000000..602dfa3a --- /dev/null +++ b/needles/anaconda_part_select_root_already_selected.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 21, + "type": "match", + "width": 79, + "xpos": 41, + "ypos": 197 + } + ], + "tags": [ + "anaconda_part_select_root", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_part_select_root_already_selected.png b/needles/anaconda_part_select_root_already_selected.png new file mode 100644 index 00000000..a8cafa3c Binary files /dev/null and b/needles/anaconda_part_select_root_already_selected.png differ diff --git a/templates b/templates index e4617d0c..e4c912cc 100755 --- a/templates +++ b/templates @@ -166,6 +166,36 @@ }, test_suite => { name => "server_delete_partial" }, }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_btrfs" }, + }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_ext3" }, + }, + { + machine => { name => "64bit" }, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "server_lvmthin" }, + }, { machine => { name => "64bit" }, product => { @@ -388,8 +418,35 @@ variables => "", }, { - name => "server_kickstart_hdd", + name => "server_btrfs", prio => 14, + settings => [ + { key => "PARTITIONING", value => "custom_btrfs" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, + { + name => "server_ext3", + prio => 15, + settings => [ + { key => "PARTITIONING", value => "custom_ext3" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, + { + name => "server_lvmthin", + prio => 16, + settings => [ + { key => "PARTITIONING", value => "custom_lvmthin" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + ], + variables => "", + }, + { + name => "server_kickstart_hdd", + prio => 17, settings => [ { key => "KICKSTART", value => "1" }, { key => "GRUB", value => "inst.ks=hd:vdb1:/root-user-crypted-net.ks" }, @@ -403,7 +460,7 @@ }, { name => "fedup_minimal", - prio => 15, + prio => 18, settings => [ { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "BOOTFROM", value => "c" }, @@ -414,7 +471,7 @@ }, { name => "fedup_desktop", - prio => 15, + prio => 19, settings => [ { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "BOOTFROM", value => "c" }, diff --git a/tests/disk_custom_btrfs.pm b/tests/disk_custom_btrfs.pm new file mode 100644 index 00000000..38434f31 --- /dev/null +++ b/tests/disk_custom_btrfs.pm @@ -0,0 +1,34 @@ +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. Select BTRFS + # partitioning scheme + $self->custom_scheme_select("btrfs"); + assert_and_click "anaconda_part_automatic"; + 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_custom_ext3.pm b/tests/disk_custom_ext3.pm new file mode 100644 index 00000000..a6249c8b --- /dev/null +++ b/tests/disk_custom_ext3.pm @@ -0,0 +1,37 @@ +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. Select Standard + # Partition scheme + $self->custom_scheme_select("standard"); + # Do 'automatic' partition creation + assert_and_click "anaconda_part_automatic"; + # Change root partition to ext3 + $self->custom_change_fs("ext3"); + 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_custom_lvmthin.pm b/tests/disk_custom_lvmthin.pm new file mode 100644 index 00000000..a588f2df --- /dev/null +++ b/tests/disk_custom_lvmthin.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. Select LVM Thin + # Partitioning scheme + $self->custom_scheme_select("lvmthin"); + # Do 'automatic' partition creation + assert_and_click "anaconda_part_automatic"; + 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_custom_software_raid.pm b/tests/disk_custom_software_raid.pm index bc5b4401..bbe3d576 100644 --- a/tests/disk_custom_software_raid.pm +++ b/tests/disk_custom_software_raid.pm @@ -5,9 +5,8 @@ use testapi; sub run { my $self = shift; # Go to INSTALLATION DESTINATION and ensure two disks are selected. + # Because PARTITIONING starts with 'custom_', this will select custom. $self->select_disks(2); - # select custom partitioning - assert_and_click "anaconda_manual_partitioning"; assert_and_click "anaconda_spoke_done"; # Manual partitioning spoke should be displayed