diff --git a/check-needles.py b/check-needles.py index 6307fda4..e37148ed 100755 --- a/check-needles.py +++ b/check-needles.py @@ -85,7 +85,7 @@ for part in ("swap", "root", "efi", "boot"): for num in range(1, 10): testliterals.append(f"anaconda_install_destination_select_disk_{num}") # custom_scheme_select -for scheme in ("standard", "lvmthin", "btrfs"): +for scheme in ("standard", "lvmthin", "btrfs", "lvm"): testliterals.append(f"anaconda_part_scheme_{scheme}") # custom_blivet_add_partition for dtype in ("lvm", "lvmthin", "raid"): @@ -97,7 +97,7 @@ for fsys in ("ext3", "ext4", "xfs", "btrfs", "ppc_prep_boot", "swap", "efi_files # one value testliterals.append("anaconda_part_device_type_raid") # custom_change_fs -for fsys in ("ext3", "xfs"): +for fsys in ("ext3", "xfs", "ext4"): testliterals.append(f"anaconda_part_fs_{fsys}") testliterals.append(f"anaconda_part_fs_{fsys}_selected") # variable-y in custom_change_device but we only have one value diff --git a/needles/anaconda/partitioning/fs_ext4.json b/needles/anaconda/partitioning/fs_ext4.json new file mode 100644 index 00000000..127fb16e --- /dev/null +++ b/needles/anaconda/partitioning/fs_ext4.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 505, + "ypos": 283, + "width": 34, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_part_fs_ext4" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/fs_ext4.png b/needles/anaconda/partitioning/fs_ext4.png new file mode 100644 index 00000000..7a773483 Binary files /dev/null and b/needles/anaconda/partitioning/fs_ext4.png differ diff --git a/needles/anaconda/partitioning/scheme_lvm.json b/needles/anaconda/partitioning/scheme_lvm.json new file mode 100644 index 00000000..aa12601f --- /dev/null +++ b/needles/anaconda/partitioning/scheme_lvm.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 64, + "ypos": 311, + "width": 33, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_part_scheme_lvm", + "ENV-DISTRI-fedora", + "LANGUAGE-english", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/scheme_lvm.png b/needles/anaconda/partitioning/scheme_lvm.png new file mode 100644 index 00000000..753eccd2 Binary files /dev/null and b/needles/anaconda/partitioning/scheme_lvm.png differ diff --git a/templates.fif.json b/templates.fif.json index b0384f13..7f920d66 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -746,15 +746,16 @@ }, "install_resize_lvm": { "profiles": { - "fedora-universal-aarch64-*-aarch64": 20, - "fedora-universal-ppc64le-*-ppc64le": 20, - "fedora-universal-x86_64-*-64bit": 20 + "fedora-Server-dvd-iso-aarch64-*-aarch64": 40, + "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40, + "fedora-Server-dvd-iso-x86_64-*-64bit": 40 }, "settings": { "PARTITIONING": "custom_resize_lvm", - "HDD_1": "disk_f%PREVREL%_desktop_4_%ARCH%.img", + "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", "INSTALL": "1", - "ROOT_PASSWORD": "weakpassword" + "ROOT_PASSWORD": "weakpassword", + "START_AFTER_TEST": "install_lvm_ext4" } }, "desktop_browser": { @@ -1185,6 +1186,19 @@ "ROOT_PASSWORD": "weakpassword" } }, + "install_lvm_ext4": { + "profiles": { + "fedora-Server-dvd-iso-aarch64-*-aarch64": 40, + "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40, + "fedora-Server-dvd-iso-x86_64-*-64bit": 40, + "fedora-Server-dvd-iso-x86_64-*-uefi": 41 + }, + "settings": { + "PARTITIONING": "custom_lvm", + "ROOT_PASSWORD": "weakpassword", + "STORE_HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2" + } + }, "install_mirrorlist_graphical": { "profiles": { "fedora-universal-aarch64-*-aarch64": 20, diff --git a/tests/disk_custom_lvm.pm b/tests/disk_custom_lvm.pm new file mode 100644 index 00000000..be438d5b --- /dev/null +++ b/tests/disk_custom_lvm.pm @@ -0,0 +1,36 @@ +use base "anacondatest"; +use strict; +use testapi; +use anaconda; + +sub run { + my $self = shift; + # Go to INSTALLATION DESTINATION and ensure the disk is selected. + # Because PARTITIONING starts with 'custom_', this will select custom. + select_disks(); + assert_and_click "anaconda_spoke_done"; + + # Manual partitioning spoke should be displayed. Select LVM + # Partitioning scheme + custom_scheme_select("lvm"); + # Do 'automatic' partition creation + assert_and_click "anaconda_part_automatic"; + # Change file system to ext4 on root and boot partitions. + custom_change_fs("ext4", "root"); + custom_change_fs("ext4", "boot"); + # Confirm changes + assert_and_click "anaconda_spoke_done"; + assert_and_click "anaconda_part_accept_changes"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/disk_custom_resize_lvm.pm b/tests/disk_custom_resize_lvm.pm index fb07e085..88c18013 100644 --- a/tests/disk_custom_resize_lvm.pm +++ b/tests/disk_custom_resize_lvm.pm @@ -79,10 +79,12 @@ sub run { send_key "tab"; assert_and_click "anaconda_part_add_mountpoint"; - # Then mount the Swap partition. - assert_and_click "anaconda_part_select_swap"; - assert_and_click "anaconda_part_device_reformat"; - assert_and_click "anaconda_part_update_settings"; + # Then mount the Swap partition if it is present. + if (check_screen "anaconda_part_select_swap") { + assert_and_click "anaconda_part_select_swap"; + assert_and_click "anaconda_part_device_reformat"; + assert_and_click "anaconda_part_update_settings"; + } # Close the spoke. assert_and_click "anaconda_spoke_done";