2015-08-05 06:23:59 +00:00
|
|
|
use base "anacondatest";
|
2015-02-04 12:02:54 +00:00
|
|
|
use strict;
|
|
|
|
use testapi;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
|
|
|
use anaconda;
|
2016-09-12 17:24:30 +00:00
|
|
|
use Time::HiRes qw( usleep );
|
2015-02-04 12:02:54 +00:00
|
|
|
|
2021-08-11 19:15:46 +00:00
|
|
|
sub main_repo {
|
add NFS tests (and DHCP/DNS in the support server)
Summary:
Set up the support server to provide DHCP/DNS functionality and
an NFS server, providing a kickstart. Add a kickstart test just
like the other root-user-crypted-net kickstart tests except it
gets the kickstart from the support server via NFS. Also add NFS
repository tests and a second support server for Server-dvd-iso
flavor: this test must run on that flavor to ensure that packages
are actually available. The support server just mounts the
attached 'DVD' and exports it via NFS.
Note we don't need to do anything clever to avoid IP conflicts
between the two support servers, because os-autoinst-openvswitch
ensures each worker group is on its own VLAN.
As part of adding the NFS repo tests, I did a bit of cleanup,
moving little things we were repeating a lot into anacondatest,
and sharing the 'check if the repo was used' logic between all
the tests (by making it into a test step that's loaded for all
of them). I also simplified the 'was repo used' checks a bit,
it seems silly to run a 'grep' command inside the VM then have
os-autoinst do a grep on the output (which is effectively what
we were doing before), instead we'll just use a single grep
within the VM, and clean up the messy quoting/escaping a bit.
Test Plan:
Run all tests - at least all repository tests - and
check they work (make sure the tests are actually still sane,
not just that they pass). I've done runs of all the repo tests
and they look good to me, but please double-check. I'm currently
re-running the whole 24-20160609.n.0 test on staging with these
changes.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D888
2016-06-13 15:42:30 +00:00
|
|
|
# select appropriate protocol on the network
|
2015-02-04 12:02:54 +00:00
|
|
|
assert_and_click "anaconda_install_source_on_the_network";
|
|
|
|
send_key "tab";
|
2016-09-12 17:24:30 +00:00
|
|
|
wait_still_screen 2;
|
2016-09-02 15:51:36 +00:00
|
|
|
# select appropriate repo type for the URL by pressing 'up' a given
|
|
|
|
# number of times. default - 3 - is https
|
|
|
|
my $num = 3;
|
|
|
|
if (get_var("REPOSITORY_GRAPHICAL") =~ m/^nfs:/) {
|
|
|
|
$num = 1;
|
|
|
|
}
|
|
|
|
if (get_var("REPOSITORY_GRAPHICAL") =~ m/^http:/) {
|
|
|
|
$num = 4;
|
|
|
|
}
|
|
|
|
for (my $i=0; $i<$num; $i++) {
|
2015-02-04 12:02:54 +00:00
|
|
|
send_key "up";
|
2016-09-12 17:24:30 +00:00
|
|
|
usleep 100;
|
2015-02-04 12:02:54 +00:00
|
|
|
}
|
2016-09-02 15:51:36 +00:00
|
|
|
# we accept any of the protocol needles here, if we happened to
|
|
|
|
# choose wrong the test will fail soon anyhow
|
add NFS tests (and DHCP/DNS in the support server)
Summary:
Set up the support server to provide DHCP/DNS functionality and
an NFS server, providing a kickstart. Add a kickstart test just
like the other root-user-crypted-net kickstart tests except it
gets the kickstart from the support server via NFS. Also add NFS
repository tests and a second support server for Server-dvd-iso
flavor: this test must run on that flavor to ensure that packages
are actually available. The support server just mounts the
attached 'DVD' and exports it via NFS.
Note we don't need to do anything clever to avoid IP conflicts
between the two support servers, because os-autoinst-openvswitch
ensures each worker group is on its own VLAN.
As part of adding the NFS repo tests, I did a bit of cleanup,
moving little things we were repeating a lot into anacondatest,
and sharing the 'check if the repo was used' logic between all
the tests (by making it into a test step that's loaded for all
of them). I also simplified the 'was repo used' checks a bit,
it seems silly to run a 'grep' command inside the VM then have
os-autoinst do a grep on the output (which is effectively what
we were doing before), instead we'll just use a single grep
within the VM, and clean up the messy quoting/escaping a bit.
Test Plan:
Run all tests - at least all repository tests - and
check they work (make sure the tests are actually still sane,
not just that they pass). I've done runs of all the repo tests
and they look good to me, but please double-check. I'm currently
re-running the whole 24-20160609.n.0 test on staging with these
changes.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D888
2016-06-13 15:42:30 +00:00
|
|
|
assert_screen "anaconda_install_source_selected";
|
2015-02-04 12:02:54 +00:00
|
|
|
|
|
|
|
# insert the url
|
2016-09-12 17:24:30 +00:00
|
|
|
wait_screen_change { send_key "tab"; };
|
2015-02-04 12:02:54 +00:00
|
|
|
my $repourl = "";
|
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# if either MIRRORLIST_GRAPHICAL or REPOSITORY_GRAPHICAL is set, type this into
|
|
|
|
# the repository url input
|
add NFS tests (and DHCP/DNS in the support server)
Summary:
Set up the support server to provide DHCP/DNS functionality and
an NFS server, providing a kickstart. Add a kickstart test just
like the other root-user-crypted-net kickstart tests except it
gets the kickstart from the support server via NFS. Also add NFS
repository tests and a second support server for Server-dvd-iso
flavor: this test must run on that flavor to ensure that packages
are actually available. The support server just mounts the
attached 'DVD' and exports it via NFS.
Note we don't need to do anything clever to avoid IP conflicts
between the two support servers, because os-autoinst-openvswitch
ensures each worker group is on its own VLAN.
As part of adding the NFS repo tests, I did a bit of cleanup,
moving little things we were repeating a lot into anacondatest,
and sharing the 'check if the repo was used' logic between all
the tests (by making it into a test step that's loaded for all
of them). I also simplified the 'was repo used' checks a bit,
it seems silly to run a 'grep' command inside the VM then have
os-autoinst do a grep on the output (which is effectively what
we were doing before), instead we'll just use a single grep
within the VM, and clean up the messy quoting/escaping a bit.
Test Plan:
Run all tests - at least all repository tests - and
check they work (make sure the tests are actually still sane,
not just that they pass). I've done runs of all the repo tests
and they look good to me, but please double-check. I'm currently
re-running the whole 24-20160609.n.0 test on staging with these
changes.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D888
2016-06-13 15:42:30 +00:00
|
|
|
if (get_var("MIRRORLIST_GRAPHICAL")) {
|
2017-01-18 07:15:44 +00:00
|
|
|
$repourl = get_mirrorlist_url();
|
2016-09-12 17:24:30 +00:00
|
|
|
type_safely $repourl;
|
2015-02-04 12:02:54 +00:00
|
|
|
|
|
|
|
# select as mirror list
|
2017-10-16 21:23:56 +00:00
|
|
|
send_key "tab";
|
|
|
|
send_key "tab";
|
|
|
|
send_key "down";
|
2015-02-04 12:02:54 +00:00
|
|
|
}
|
add NFS tests (and DHCP/DNS in the support server)
Summary:
Set up the support server to provide DHCP/DNS functionality and
an NFS server, providing a kickstart. Add a kickstart test just
like the other root-user-crypted-net kickstart tests except it
gets the kickstart from the support server via NFS. Also add NFS
repository tests and a second support server for Server-dvd-iso
flavor: this test must run on that flavor to ensure that packages
are actually available. The support server just mounts the
attached 'DVD' and exports it via NFS.
Note we don't need to do anything clever to avoid IP conflicts
between the two support servers, because os-autoinst-openvswitch
ensures each worker group is on its own VLAN.
As part of adding the NFS repo tests, I did a bit of cleanup,
moving little things we were repeating a lot into anacondatest,
and sharing the 'check if the repo was used' logic between all
the tests (by making it into a test step that's loaded for all
of them). I also simplified the 'was repo used' checks a bit,
it seems silly to run a 'grep' command inside the VM then have
os-autoinst do a grep on the output (which is effectively what
we were doing before), instead we'll just use a single grep
within the VM, and clean up the messy quoting/escaping a bit.
Test Plan:
Run all tests - at least all repository tests - and
check they work (make sure the tests are actually still sane,
not just that they pass). I've done runs of all the repo tests
and they look good to me, but please double-check. I'm currently
re-running the whole 24-20160609.n.0 test on staging with these
changes.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D888
2016-06-13 15:42:30 +00:00
|
|
|
elsif (get_var("REPOSITORY_GRAPHICAL")) {
|
2017-01-18 07:15:44 +00:00
|
|
|
$repourl = get_full_repo(get_var("REPOSITORY_GRAPHICAL"));
|
2017-03-01 09:59:37 +00:00
|
|
|
# strip the nfs and nfsvers prefix if present for typing here
|
add NFS tests (and DHCP/DNS in the support server)
Summary:
Set up the support server to provide DHCP/DNS functionality and
an NFS server, providing a kickstart. Add a kickstart test just
like the other root-user-crypted-net kickstart tests except it
gets the kickstart from the support server via NFS. Also add NFS
repository tests and a second support server for Server-dvd-iso
flavor: this test must run on that flavor to ensure that packages
are actually available. The support server just mounts the
attached 'DVD' and exports it via NFS.
Note we don't need to do anything clever to avoid IP conflicts
between the two support servers, because os-autoinst-openvswitch
ensures each worker group is on its own VLAN.
As part of adding the NFS repo tests, I did a bit of cleanup,
moving little things we were repeating a lot into anacondatest,
and sharing the 'check if the repo was used' logic between all
the tests (by making it into a test step that's loaded for all
of them). I also simplified the 'was repo used' checks a bit,
it seems silly to run a 'grep' command inside the VM then have
os-autoinst do a grep on the output (which is effectively what
we were doing before), instead we'll just use a single grep
within the VM, and clean up the messy quoting/escaping a bit.
Test Plan:
Run all tests - at least all repository tests - and
check they work (make sure the tests are actually still sane,
not just that they pass). I've done runs of all the repo tests
and they look good to me, but please double-check. I'm currently
re-running the whole 24-20160609.n.0 test on staging with these
changes.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D888
2016-06-13 15:42:30 +00:00
|
|
|
$repourl =~ s/^nfs://;
|
2017-03-01 09:59:37 +00:00
|
|
|
$repourl =~ s/^nfsvers=.://;
|
2016-09-12 17:24:30 +00:00
|
|
|
type_safely $repourl;
|
2015-02-04 12:02:54 +00:00
|
|
|
}
|
2021-08-11 19:15:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"));
|
2015-02-04 12:02:54 +00:00
|
|
|
|
|
|
|
assert_and_click "anaconda_spoke_done";
|
|
|
|
|
|
|
|
# Anaconda hub
|
|
|
|
assert_screen "anaconda_main_hub", 300;
|
2021-08-11 19:15:46 +00:00
|
|
|
|
|
|
|
|
2015-02-04 12:02:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return { fatal => 1 };
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|