1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

Add 'with swap' tests, drop swap parts from other tests (#180)

In Fedora 33, we generally no longer include a disk-based swap
partition by default (instead swap-on-ZRAM is used, see
https://fedoraproject.org/wiki/Changes/SwapOnZRAM ). This tweaks
our tests to account for that. In tests that aren't to do with
swap at all, we stop including a swap partition in order to be
closer to the default layout. We replace the old _no_swap blivet
and custom tests with _with_swap tests that, as the name implies,
*explicitly include* a swap partition, and adjust the postinstall
test to check the disk swap partition is there.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-08-11 13:34:37 -07:00
parent 85be99830b
commit 232b224d22
10 changed files with 57 additions and 29 deletions

View File

@ -892,6 +892,19 @@
"ROOT_PASSWORD": "weakpassword"
}
},
"install_blivet_with_swap": {
"profiles": {
"fedora-universal-aarch64-*-aarch64": 50,
"fedora-universal-ppc64le-*-ppc64le": 50,
"fedora-universal-x86_64-*-64bit": 50,
"fedora-universal-x86_64-*-uefi": 51
},
"settings": {
"PARTITIONING": "custom_blivet_with_swap",
"POSTINSTALL": "disk_custom_with_swap_postinstall",
"ROOT_PASSWORD": "weakpassword"
}
},
"install_blivet_software_raid": {
"profiles": {
"fedora-universal-aarch64-*-aarch64": 40,
@ -1186,6 +1199,18 @@
"ROOT_PASSWORD": "weakpassword"
}
},
"install_with_swap": {
"profiles": {
"fedora-universal-aarch64-*-aarch64": 50,
"fedora-universal-ppc64le-*-ppc64le": 50,
"fedora-universal-x86_64-*-64bit": 50,
"fedora-universal-x86_64-*-uefi": 51
},
"settings": {
"PARTITIONING": "custom_with_swap",
"ROOT_PASSWORD": "weakpassword"
}
},
"install_no_user": {
"profiles": {
"fedora-KDE-live-iso-x86_64-*-64bit": 21

View File

@ -19,7 +19,6 @@ sub run {
}
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
# selecting "btrfs" as filesystem creates new BTRFS drive in blivet-gui
custom_blivet_add_partition(filesystem => 'btrfs');

View File

@ -19,7 +19,6 @@ sub run {
}
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
custom_blivet_add_partition(filesystem => 'ext3', mountpoint => '/');
assert_and_click "anaconda_spoke_done";

View File

@ -23,7 +23,6 @@ sub run {
custom_blivet_add_partition(devicetype => 'lvm');
# select newly created LVM device for adding new partition
assert_and_click "anaconda_blivet_volumes_icon";
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
# add lvmthinpool
custom_blivet_add_partition(devicetype => 'lvmthin');
# select lvmthinpool for adding new partitions

View File

@ -19,7 +19,6 @@ sub run {
}
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
custom_blivet_add_partition(raid1 => 1, mountpoint => '/');
assert_and_click "anaconda_spoke_done";

View File

@ -19,10 +19,9 @@ sub run {
}
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
custom_blivet_add_partition(mountpoint => '/');
assert_and_click "anaconda_spoke_done";
# click "done" second time, because it warns us about missing swap partition
assert_and_click "anaconda_spoke_done";
assert_and_click "anaconda_part_accept_changes";

View File

@ -19,7 +19,6 @@ sub run {
}
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
custom_blivet_add_partition(filesystem => 'xfs', mountpoint => '/');
assert_and_click "anaconda_spoke_done";

View File

@ -1,17 +0,0 @@
use base "installedtest";
use strict;
use testapi;
sub run {
assert_screen "root_console";
# check that swap is not used, check that "swapon --show has empty input"
assert_script_run '[[ ! $(swapon --show) ]]';
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et:

View File

@ -1,6 +1,7 @@
use base "anacondatest";
use strict;
use testapi;
use utils;
use anaconda;
sub run {
@ -12,11 +13,17 @@ sub run {
# Manual partitioning spoke should be displayed
assert_and_click "anaconda_part_automatic";
custom_delete_part('swap');
assert_and_click "anaconda_spoke_done";
# Deleting swap shows a warning and requires a second click to confirm
# Wait a sec first, otherwise sometimes we click too fast
sleep 1;
# Make / smaller
send_key_until_needlematch("anaconda_part_mountpoint_selected", "tab", 20);
# One tab on from 'mount point selected' is 'size'
send_key "tab";
type_very_safely "8 GiB";
assert_and_click "anaconda_part_update_settings";
# Add swap
assert_and_click "anaconda_part_add";
type_very_safely "swap";
send_key "tab";
assert_and_click "anaconda_part_add_mountpoint";
assert_and_click "anaconda_spoke_done";
assert_and_click "anaconda_part_accept_changes";

View File

@ -0,0 +1,19 @@
use base "installedtest";
use strict;
use testapi;
sub run {
assert_screen "root_console";
# this is basically asserting that if we list all swaps and grep
# out any zram ones, we still have one at prio -2, which should
# be the disk-based one
assert_script_run 'swapon --show | grep -v zram | grep "\-2"';
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et: