Add initial webUI custom install tests (xfs, ext4)
This adds two initial custom layout install tests for webUI, and wires up some library functions for other tests to use. They may need refining over time but this should be good enough for a start. Signed-off-by: Adam Williamson <awilliam@redhat.com>
@ -147,7 +147,13 @@ for scheme in ("standard", "lvmthin", "btrfs", "lvm"):
|
||||
# custom_blivet_add_partition
|
||||
for dtype in ("lvmvg", "lvmlv", "lvmthin", "raid"):
|
||||
testtags.append(f"anaconda_blivet_part_devicetype_{dtype}")
|
||||
for fsys in ("ext4", "xfs", "btrfs", "ppc_prep_boot", "swap", "efi_filesystem", "biosboot"):
|
||||
# these are in webui already...
|
||||
for fsys in ("ext4", "xfs", "efi_filesystem", "biosboot"):
|
||||
testtags.append(f"anaconda_blivet_part_fs_{fsys}")
|
||||
testtags.append(f"anaconda_blivet_part_fs_{fsys}_selected")
|
||||
testtags.append(f"anaconda_webui_custom_fs_{fsys}")
|
||||
# ...these aren't yet
|
||||
for fsys in ("btrfs", "ppc_prep_boot", "swap"):
|
||||
testtags.append(f"anaconda_blivet_part_fs_{fsys}")
|
||||
testtags.append(f"anaconda_blivet_part_fs_{fsys}_selected")
|
||||
# this is variable-y in custom_blivet_resize_partition but we only
|
||||
|
@ -9,7 +9,7 @@ use testapi;
|
||||
use utils;
|
||||
use bugzilla;
|
||||
|
||||
our @EXPORT = qw/select_disks custom_scheme_select custom_blivet_add_partition custom_blivet_format_partition custom_blivet_resize_partition custom_change_type custom_change_fs custom_change_device custom_delete_part get_full_repo get_mirrorlist_url crash_anaconda_text report_bug_text/;
|
||||
our @EXPORT = qw/select_disks custom_scheme_select custom_blivet_add_partition custom_blivet_format_partition custom_blivet_resize_partition custom_change_type custom_change_fs custom_change_device custom_delete_part webui_custom_start webui_custom_create_disklabel webui_custom_add_partition webui_custom_boot_partitions get_full_repo get_mirrorlist_url crash_anaconda_text report_bug_text/;
|
||||
|
||||
sub select_disks {
|
||||
# Handles disk selection. Has one optional argument - number of
|
||||
@ -308,6 +308,82 @@ sub custom_delete_part {
|
||||
assert_and_click "anaconda_part_delete";
|
||||
}
|
||||
|
||||
sub webui_custom_start {
|
||||
# enter webui's custom partitioning flow
|
||||
|
||||
# workaround https://bugzilla.redhat.com/show_bug.cgi?id=2336488
|
||||
# by proceeding to step 2 then going back to step 1
|
||||
assert_and_click "anaconda_webui_next";
|
||||
assert_and_click "anaconda_webui_back";
|
||||
# ok now do what we meant to do
|
||||
assert_and_click "anaconda_webui_kebab_blue";
|
||||
assert_and_click "anaconda_webui_storage_editor";
|
||||
assert_and_click "anaconda_webui_storage_editor_confirm";
|
||||
}
|
||||
|
||||
sub webui_custom_create_disklabel {
|
||||
# create partition table on a blank disk
|
||||
assert_and_click "anaconda_webui_custom_unformatted";
|
||||
assert_and_click "anaconda_webui_custom_create_table";
|
||||
assert_and_click "anaconda_webui_custom_initialize";
|
||||
}
|
||||
|
||||
sub webui_custom_add_partition {
|
||||
# create a new partition in webui's custom interface
|
||||
my %args = (
|
||||
devicetype => "",
|
||||
size => 0,
|
||||
filesystem => "",
|
||||
mountpoint => "",
|
||||
@_
|
||||
);
|
||||
my $pname = "";
|
||||
if ($args{mountpoint}) {
|
||||
$pname = $args{mountpoint};
|
||||
$pname =~ s,/,,g;
|
||||
}
|
||||
assert_and_click "anaconda_webui_custom_freespace";
|
||||
assert_and_click "anaconda_webui_custom_create_partition";
|
||||
assert_screen "anaconda_webui_custom_partition_creation";
|
||||
type_very_safely $pname if ($args{mountpoint});
|
||||
send_key 'tab';
|
||||
type_very_safely $args{mountpoint} if ($args{mountpoint});
|
||||
send_key 'tab';
|
||||
if ($args{filesystem}) {
|
||||
assert_and_click "anaconda_webui_active_downcaret";
|
||||
assert_and_click "anaconda_webui_custom_fs_$args{filesystem}";
|
||||
}
|
||||
wait_still_screen 2;
|
||||
send_key 'tab';
|
||||
wait_still_screen 2;
|
||||
send_key 'tab';
|
||||
wait_still_screen 2;
|
||||
type_very_safely $args{size} if ($args{size});
|
||||
send_key 'tab';
|
||||
# select MB (size should always be in MB)
|
||||
send_key 'up' if ($args{size});
|
||||
wait_still_screen 2;
|
||||
assert_and_click "anaconda_webui_custom_create";
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
sub webui_custom_boot_partitions {
|
||||
# standard steps to create /boot/efi, /boot, bios boot, PRePboot etc.
|
||||
if (get_var("UEFI")) {
|
||||
# if we're running on UEFI, we need esp
|
||||
webui_custom_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||
}
|
||||
elsif (get_var("OFW")) {
|
||||
webui_custom_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||
}
|
||||
else {
|
||||
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||
# installs, so we need a biosboot partition
|
||||
webui_custom_add_partition(size => 1, filesystem => 'biosboot');
|
||||
}
|
||||
webui_custom_add_partition(size => 512, mountpoint => '/boot');
|
||||
}
|
||||
|
||||
sub get_full_repo {
|
||||
my ($repourl) = @_;
|
||||
# trivial thing we kept repeating: fill out an HTTP or HTTPS
|
||||
|
15
needles/anaconda/webui/webui_active_downcaret-20250110.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 677,
|
||||
"ypos": 323,
|
||||
"width": 21,
|
||||
"height": 46,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_active_downcaret"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_active_downcaret-20250110.png
Normal file
After Width: | Height: | Size: 49 KiB |
15
needles/anaconda/webui/webui_back-20250109.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 279,
|
||||
"ypos": 727,
|
||||
"width": 41,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_back"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_back-20250109.png
Normal file
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,17 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 727,
|
||||
"height": 17,
|
||||
"xpos": 364,
|
||||
"width": 43,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"ENV-DISTRI-fedora",
|
||||
"LANGUAGE-english",
|
||||
"anaconda_webui_begin_installation"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 44 KiB |
15
needles/anaconda/webui/webui_continue-20250110.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 272,
|
||||
"ypos": 315,
|
||||
"width": 66,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_continue"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_continue-20250110.png
Normal file
After Width: | Height: | Size: 154 KiB |
15
needles/anaconda/webui/webui_custom_create-20250110.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 90,
|
||||
"ypos": 511,
|
||||
"width": 53,
|
||||
"height": 16,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_create"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_create-20250110.png
Normal file
After Width: | Height: | Size: 139 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 589,
|
||||
"ypos": 393,
|
||||
"width": 51,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_create_partition"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 44 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 550,
|
||||
"ypos": 409,
|
||||
"width": 51,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_create_table"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_create_table-20250110.png
Normal file
After Width: | Height: | Size: 46 KiB |
19
needles/anaconda/webui/webui_custom_freespace-20250110.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 51,
|
||||
"ypos": 339,
|
||||
"width": 651,
|
||||
"height": 29,
|
||||
"type": "match",
|
||||
"click_point": {
|
||||
"xpos": 645.5,
|
||||
"ypos": 14.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_freespace"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_freespace-20250110.png
Normal file
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,19 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 53,
|
||||
"ypos": 447,
|
||||
"width": 653,
|
||||
"height": 29,
|
||||
"type": "match",
|
||||
"click_point": {
|
||||
"xpos": 641.5,
|
||||
"ypos": 17.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_freespace"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 47 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 241,
|
||||
"ypos": 541,
|
||||
"width": 35,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_fs_biosboot"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_fs_biosboot-20250111.png
Normal file
After Width: | Height: | Size: 147 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 239,
|
||||
"ypos": 540,
|
||||
"width": 79,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_fs_efi_filesystem"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 150 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 240,
|
||||
"ypos": 401,
|
||||
"width": 38,
|
||||
"height": 16,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_fs_ext4"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 147 KiB |
15
needles/anaconda/webui/webui_custom_fs_xfs-20250110.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 240,
|
||||
"ypos": 372,
|
||||
"width": 28,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_fs_xfs"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_fs_xfs-20250110.png
Normal file
After Width: | Height: | Size: 147 KiB |
15
needles/anaconda/webui/webui_custom_initialize-20250110.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 91,
|
||||
"ypos": 327,
|
||||
"width": 59,
|
||||
"height": 15,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_initialize"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_initialize-20250110.png
Normal file
After Width: | Height: | Size: 45 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 94,
|
||||
"ypos": 161,
|
||||
"width": 176,
|
||||
"height": 31,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_partition_creation"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 48 KiB |
15
needles/anaconda/webui/webui_custom_return-20250110.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 56,
|
||||
"ypos": 694,
|
||||
"width": 17,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_return"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_return-20250110.png
Normal file
After Width: | Height: | Size: 134 KiB |
@ -0,0 +1,19 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 53,
|
||||
"ypos": 252,
|
||||
"width": 668,
|
||||
"height": 38,
|
||||
"type": "match",
|
||||
"click_point": {
|
||||
"xpos": 642,
|
||||
"ypos": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_custom_unformatted"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_custom_unformatted-20250110.png
Normal file
After Width: | Height: | Size: 41 KiB |
15
needles/anaconda/webui/webui_kebab_blue-20250108.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 973,
|
||||
"ypos": 52,
|
||||
"width": 21,
|
||||
"height": 28,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_kebab_blue"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_kebab_blue-20250108.png
Normal file
After Width: | Height: | Size: 42 KiB |
15
needles/anaconda/webui/webui_storage_editor-20250109.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 834,
|
||||
"ypos": 105,
|
||||
"width": 160,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_storage_editor"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_storage_editor-20250109.png
Normal file
After Width: | Height: | Size: 46 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 272,
|
||||
"ypos": 486,
|
||||
"width": 159,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_webui_storage_editor_confirm"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/webui/webui_storage_editor_confirm-20250109.png
Normal file
After Width: | Height: | Size: 52 KiB |
@ -2305,6 +2305,28 @@
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"install_webui_ext4": {
|
||||
"profiles": {
|
||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 10,
|
||||
"fedora-Workstation-live-iso-x86_64-*-bios": 11
|
||||
},
|
||||
"settings": {
|
||||
"PARTITIONING": "webui_ext4",
|
||||
"POSTINSTALL": "disk_custom_blivet_standard_partition_ext4_postinstall",
|
||||
"ROOT_PASSWORD": "weakpassword"
|
||||
}
|
||||
},
|
||||
"install_webui_xfs": {
|
||||
"profiles": {
|
||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 10,
|
||||
"fedora-Workstation-live-iso-x86_64-*-bios": 11
|
||||
},
|
||||
"settings": {
|
||||
"PARTITIONING": "webui_xfs",
|
||||
"POSTINSTALL": "disk_custom_xfs_postinstall",
|
||||
"ROOT_PASSWORD": "weakpassword"
|
||||
}
|
||||
},
|
||||
"install_xfs": {
|
||||
"profiles": {
|
||||
"fedora-Server-dvd-iso-aarch64-*-aarch64": 40,
|
||||
|
@ -3,6 +3,8 @@ use strict;
|
||||
use testapi;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty => 3, timeout => 30);
|
||||
assert_screen "root_console";
|
||||
# check number of partitions
|
||||
script_run 'fdisk -l | grep /dev/vda'; # debug
|
||||
|
@ -3,7 +3,8 @@ use strict;
|
||||
use testapi;
|
||||
|
||||
sub run {
|
||||
assert_screen "root_console";
|
||||
my $self = shift;
|
||||
$self->root_console(tty => 3, timeout => 30);
|
||||
# check that xfs is used on root partition
|
||||
assert_script_run "mount | grep 'on / type xfs'";
|
||||
}
|
||||
|
26
tests/disk_webui_ext4.pm
Normal file
@ -0,0 +1,26 @@
|
||||
use base "anacondatest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use anaconda;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
webui_custom_start;
|
||||
webui_custom_create_disklabel;
|
||||
webui_custom_boot_partitions;
|
||||
|
||||
webui_custom_add_partition(filesystem => 'ext4', mountpoint => '/');
|
||||
|
||||
assert_and_click "anaconda_webui_custom_return";
|
||||
assert_and_click "anaconda_webui_continue";
|
||||
assert_screen "anaconda_webui_welcome";
|
||||
assert_and_click "anaconda_webui_next";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
26
tests/disk_webui_xfs.pm
Normal file
@ -0,0 +1,26 @@
|
||||
use base "anacondatest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use anaconda;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
webui_custom_start;
|
||||
webui_custom_create_disklabel;
|
||||
webui_custom_boot_partitions;
|
||||
|
||||
webui_custom_add_partition(filesystem => 'xfs', mountpoint => '/');
|
||||
|
||||
assert_and_click "anaconda_webui_custom_return";
|
||||
assert_and_click "anaconda_webui_continue";
|
||||
assert_screen "anaconda_webui_welcome";
|
||||
assert_and_click "anaconda_webui_next";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|