mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-25 07:13:09 +00:00
Add a test of an additional repository using a metalink (#198)
As suggested by @kparal, this adds a test that specifies an additional repository using a metalink. The repository contains a single package, 'testpackage', that supplements glibc (so it should always get installed). The test runs an install then checks that testpackage got installed. We also deduplicate a pair of needles which were matching on the same anaconda UI feature (an "add" button) and use that same needle in this test. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
2ed23740d4
commit
803ae7ca57
@ -126,7 +126,7 @@ sub custom_blivet_add_partition {
|
|||||||
);
|
);
|
||||||
$args{devicetype} = "raid" if $args{raid1};
|
$args{devicetype} = "raid" if $args{raid1};
|
||||||
|
|
||||||
assert_and_click "anaconda_blivet_part_add";
|
assert_and_click "anaconda_add";
|
||||||
mouse_set(10, 10);
|
mouse_set(10, 10);
|
||||||
if ($args{devicetype}) {
|
if ($args{devicetype}) {
|
||||||
assert_and_click "anaconda_blivet_part_devicetype";
|
assert_and_click "anaconda_blivet_part_devicetype";
|
||||||
|
2
main.pm
2
main.pm
@ -173,7 +173,7 @@ sub load_install_tests() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
## Installation source
|
## Installation source
|
||||||
if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL")) {
|
if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL") || get_var("ADD_REPOSITORY_GRAPHICAL")) {
|
||||||
autotest::loadtest "tests/install_source_graphical.pm";
|
autotest::loadtest "tests/install_source_graphical.pm";
|
||||||
autotest::loadtest "tests/_check_install_source.pm";
|
autotest::loadtest "tests/_check_install_source.pm";
|
||||||
}
|
}
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"anaconda_part_add"
|
|
||||||
],
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"xpos": 22,
|
|
||||||
"ypos": 630,
|
|
||||||
"width": 53,
|
|
||||||
"height": 14,
|
|
||||||
"type": "match"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
@ -10,6 +10,6 @@
|
|||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
"tags": [
|
"tags": [
|
||||||
"anaconda_blivet_part_add"
|
"anaconda_add"
|
||||||
]
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
@ -1007,6 +1007,17 @@
|
|||||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
|
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"install_addrepo_metalink_graphical": {
|
||||||
|
"profiles": {
|
||||||
|
"fedora-universal-aarch64-*-aarch64": 50,
|
||||||
|
"fedora-universal-ppc64le-*-ppc64le": 50,
|
||||||
|
"fedora-universal-x86_64-*-64bit": 50
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"ADD_REPOSITORY_GRAPHICAL": "ml:https://fedorapeople.org/groups/qa/openqa-repos/openqa-testrepo-2.xml",
|
||||||
|
"POSTINSTALL": "_addrepo_metalink_post"
|
||||||
|
}
|
||||||
|
},
|
||||||
"install_anaconda_text": {
|
"install_anaconda_text": {
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"fedora-universal-aarch64-*-aarch64": 20,
|
"fedora-universal-aarch64-*-aarch64": 20,
|
||||||
|
16
tests/_addrepo_metalink_post.pm
Normal file
16
tests/_addrepo_metalink_post.pm
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
use base "installedtest";
|
||||||
|
use strict;
|
||||||
|
use testapi;
|
||||||
|
|
||||||
|
sub run {
|
||||||
|
# check the test package from the side repo was installed
|
||||||
|
assert_script_run "rpm -q testpackage";
|
||||||
|
}
|
||||||
|
|
||||||
|
sub test_flags {
|
||||||
|
return { fatal => 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
# vim: set sw=4 et:
|
@ -33,7 +33,7 @@ sub run {
|
|||||||
# Construct inst.addrepo arg for ADD_REPOSITORY_VARIATION
|
# Construct inst.addrepo arg for ADD_REPOSITORY_VARIATION
|
||||||
my $repourl = get_var("ADD_REPOSITORY_VARIATION");
|
my $repourl = get_var("ADD_REPOSITORY_VARIATION");
|
||||||
if ($repourl) {
|
if ($repourl) {
|
||||||
$params .= "inst.addrepo=addrepo," . get_full_repo($repourl) . " ";
|
$params .= "inst.addrepo=addrepo,$repourl ";
|
||||||
}
|
}
|
||||||
if (get_var("ANACONDA_TEXT")) {
|
if (get_var("ANACONDA_TEXT")) {
|
||||||
$params .= "inst.text ";
|
$params .= "inst.text ";
|
||||||
|
@ -12,6 +12,8 @@ sub run {
|
|||||||
$repourl = get_mirrorlist_url();
|
$repourl = get_mirrorlist_url();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
# we kinda intentionally don't check ADD_REPOSITORY_GRAPHICAL
|
||||||
|
# here, as we cover that case with a postinstall check
|
||||||
$repourl = get_var("REPOSITORY_VARIATION", get_var("REPOSITORY_GRAPHICAL"));
|
$repourl = get_var("REPOSITORY_VARIATION", get_var("REPOSITORY_GRAPHICAL"));
|
||||||
$repourl = get_full_repo($repourl) if ($repourl);
|
$repourl = get_full_repo($repourl) if ($repourl);
|
||||||
$addrepourl = get_var("ADD_REPOSITORY_VARIATION");
|
$addrepourl = get_var("ADD_REPOSITORY_VARIATION");
|
||||||
|
@ -91,7 +91,7 @@ sub run {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Add new root partition
|
# Add new root partition
|
||||||
assert_and_click "anaconda_blivet_part_add";
|
assert_and_click "anaconda_add";
|
||||||
# Select the name textfield
|
# Select the name textfield
|
||||||
send_key_until_needlematch("anaconda_blivet_part_name_selected", "tab", 3, 5);
|
send_key_until_needlematch("anaconda_blivet_part_name_selected", "tab", 3, 5);
|
||||||
# type the new name
|
# type the new name
|
||||||
|
@ -59,7 +59,7 @@ sub run {
|
|||||||
assert_and_click "anaconda_part_confirm_delete";
|
assert_and_click "anaconda_part_confirm_delete";
|
||||||
|
|
||||||
# Add the new root partition to the scheme
|
# Add the new root partition to the scheme
|
||||||
assert_and_click "anaconda_part_add";
|
assert_and_click "anaconda_add";
|
||||||
type_very_safely "/\n";
|
type_very_safely "/\n";
|
||||||
|
|
||||||
# Confirm changes
|
# Confirm changes
|
||||||
|
@ -66,7 +66,7 @@ sub run {
|
|||||||
assert_screen "device_root_resized_thirteen";
|
assert_screen "device_root_resized_thirteen";
|
||||||
|
|
||||||
# Add new /home partition into the emptied space.
|
# Add new /home partition into the emptied space.
|
||||||
assert_and_click "anaconda_part_add";
|
assert_and_click "anaconda_add";
|
||||||
|
|
||||||
# The previous step brings us into a mountpoint field
|
# The previous step brings us into a mountpoint field
|
||||||
# of the pop-up window, so we only need to fill the value in.
|
# of the pop-up window, so we only need to fill the value in.
|
||||||
|
@ -21,7 +21,7 @@ sub run {
|
|||||||
assert_and_click "anaconda_part_update_settings";
|
assert_and_click "anaconda_part_update_settings";
|
||||||
wait_still_screen 5;
|
wait_still_screen 5;
|
||||||
# Add swap
|
# Add swap
|
||||||
assert_and_click "anaconda_part_add";
|
assert_and_click "anaconda_add";
|
||||||
type_very_safely "swap";
|
type_very_safely "swap";
|
||||||
send_key "tab";
|
send_key "tab";
|
||||||
assert_and_click "anaconda_part_add_mountpoint";
|
assert_and_click "anaconda_part_add_mountpoint";
|
||||||
|
@ -5,14 +5,7 @@ use utils;
|
|||||||
use anaconda;
|
use anaconda;
|
||||||
use Time::HiRes qw( usleep );
|
use Time::HiRes qw( usleep );
|
||||||
|
|
||||||
sub run {
|
sub main_repo {
|
||||||
my $self = shift;
|
|
||||||
# Anaconda hub
|
|
||||||
assert_screen "anaconda_main_hub", 300; #
|
|
||||||
|
|
||||||
# Go into the Install Source spoke
|
|
||||||
assert_and_click "anaconda_main_hub_installation_source";
|
|
||||||
|
|
||||||
# select appropriate protocol on the network
|
# select appropriate protocol on the network
|
||||||
assert_and_click "anaconda_install_source_on_the_network";
|
assert_and_click "anaconda_install_source_on_the_network";
|
||||||
send_key "tab";
|
send_key "tab";
|
||||||
@ -56,11 +49,56 @@ sub run {
|
|||||||
$repourl =~ s/^nfsvers=.://;
|
$repourl =~ s/^nfsvers=.://;
|
||||||
type_safely $repourl;
|
type_safely $repourl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub add_repo {
|
||||||
|
my $repourl = get_var("ADD_REPOSITORY_GRAPHICAL");
|
||||||
|
my $metalink;
|
||||||
|
if ($repourl =~ m/^ml:/) {
|
||||||
|
$metalink = 1;
|
||||||
|
$repourl =~ s/^ml://;
|
||||||
|
}
|
||||||
|
# configure an additional repository
|
||||||
|
assert_and_click "anaconda_add";
|
||||||
|
# shift-tab seven times gets us to the scheme box
|
||||||
|
for (my $i=0; $i<7; $i++) {
|
||||||
|
send_key "shift-tab";
|
||||||
|
usleep 100;
|
||||||
|
}
|
||||||
|
# select appropriate repo type for the URL by pressing 'down' a given
|
||||||
|
# number of times. default - 1 - is https
|
||||||
|
my $num = 1;
|
||||||
|
for (my $i=0; $i<$num; $i++) {
|
||||||
|
send_key "down";
|
||||||
|
usleep 100;
|
||||||
|
}
|
||||||
|
send_key "tab";
|
||||||
|
type_string $repourl;
|
||||||
|
if ($metalink) {
|
||||||
|
# select metalink in URL type dropdown
|
||||||
|
send_key "tab";
|
||||||
|
send_key "down";
|
||||||
|
send_key "down";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub run {
|
||||||
|
my $self = shift;
|
||||||
|
# Anaconda hub
|
||||||
|
assert_screen "anaconda_main_hub", 300;
|
||||||
|
|
||||||
|
# Go into the Install Source spoke
|
||||||
|
assert_and_click "anaconda_main_hub_installation_source";
|
||||||
|
|
||||||
|
main_repo() if (get_var("REPOSITORY_GRAPHICAL") || get_var("MIRRORLIST_GRAPHICAL"));
|
||||||
|
add_repo() if (get_var("ADD_REPOSITORY_GRAPHICAL"));
|
||||||
|
|
||||||
assert_and_click "anaconda_spoke_done";
|
assert_and_click "anaconda_spoke_done";
|
||||||
|
|
||||||
# Anaconda hub
|
# Anaconda hub
|
||||||
assert_screen "anaconda_main_hub", 300;
|
assert_screen "anaconda_main_hub", 300;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
Loading…
Reference in New Issue
Block a user