add ext3, btrfs and LVM thin tests, tweaks to custom methods

Summary:
This adds three new custom storage tests and some needles to
support them, and tweaks the custom storage methods a bit to
address some things that cropped up in writing the tests. A
new method is added for changing the filesystem, as that's
a distinct operation from changing the device type.

This also restores the previous behaviour of select_disks()
where it handled selecting custom partitioning when needed.
Turns out it's pretty common to use regex'es in perl! Who'd'a
thought.

A corresponding commit to add the tests to openqa_fedora_tools
is coming.

There's no post-install step for the tests yet; I'll try and
write those up and add them soon.

Test Plan:
Do a full run, including the new tests, on Alpha RC2 and check
all are scheduled correctly and run correctly. The LVM thinp
test is expected to fail as it catches a genuine bug.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D490
This commit is contained in:
Adam Williamson 2015-08-10 11:01:12 -07:00
parent cd57a721bc
commit 8fde224dc5
26 changed files with 353 additions and 17 deletions

View File

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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

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

View File

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

37
tests/disk_custom_ext3.pm Normal file
View File

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

View File

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

View File

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