Add an installation test using LVM partitioning as asset for resize tests.

When Fedora went to BTRFS as a default, we lost the LVM based image to
run LVM resize tests with.

This PR introduces the `install_lvm.pm` installation test that creates
an LVM based qcow2 image to be used by follow-up tests.
This commit is contained in:
Lukáš Růžička 2020-11-18 13:44:05 +01:00
parent a706fe5249
commit 5718c7f1d4
8 changed files with 96 additions and 11 deletions

View File

@ -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

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 505,
"ypos": 283,
"width": 34,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"anaconda_part_fs_ext4"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -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,

36
tests/disk_custom_lvm.pm Normal file
View File

@ -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:

View File

@ -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";