diff --git a/lib/anaconda.pm b/lib/anaconda.pm index 471417e0..930b112f 100644 --- a/lib/anaconda.pm +++ b/lib/anaconda.pm @@ -126,7 +126,7 @@ sub custom_blivet_add_partition { ); $args{devicetype} = "raid" if $args{raid1}; - assert_and_click "anaconda_blivet_part_add"; + assert_and_click "anaconda_add"; mouse_set(10, 10); if ($args{devicetype}) { assert_and_click "anaconda_blivet_part_devicetype"; diff --git a/main.pm b/main.pm index 95009134..3f48bf11 100644 --- a/main.pm +++ b/main.pm @@ -173,7 +173,7 @@ sub load_install_tests() { } ## 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/_check_install_source.pm"; } diff --git a/needles/anaconda/partitioning/add.json b/needles/anaconda/partitioning/add.json deleted file mode 100644 index aaaa67dc..00000000 --- a/needles/anaconda/partitioning/add.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "properties": [], - "tags": [ - "anaconda_part_add" - ], - "area": [ - { - "xpos": 22, - "ypos": 630, - "width": 53, - "height": 14, - "type": "match" - } - ] -} \ No newline at end of file diff --git a/needles/anaconda/partitioning/add.png b/needles/anaconda/partitioning/add.png deleted file mode 100644 index 271003f6..00000000 Binary files a/needles/anaconda/partitioning/add.png and /dev/null differ diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_add-gtk3245-20190206.json b/needles/anaconda/universal/add.json similarity index 78% rename from needles/anaconda/partitioning/blivet/anaconda_blivet_part_add-gtk3245-20190206.json rename to needles/anaconda/universal/add.json index 4a6a3553..43f670d1 100644 --- a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_add-gtk3245-20190206.json +++ b/needles/anaconda/universal/add.json @@ -10,6 +10,6 @@ ], "properties": [], "tags": [ - "anaconda_blivet_part_add" + "anaconda_add" ] -} \ No newline at end of file +} diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_add-gtk3245-20190206.png b/needles/anaconda/universal/add.png similarity index 100% rename from needles/anaconda/partitioning/blivet/anaconda_blivet_part_add-gtk3245-20190206.png rename to needles/anaconda/universal/add.png diff --git a/templates.fif.json b/templates.fif.json index a6053629..7381f7a0 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -1007,6 +1007,17 @@ "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": { "profiles": { "fedora-universal-aarch64-*-aarch64": 20, diff --git a/tests/_addrepo_metalink_post.pm b/tests/_addrepo_metalink_post.pm new file mode 100644 index 00000000..9f7f01fa --- /dev/null +++ b/tests/_addrepo_metalink_post.pm @@ -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: diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 5d752c2f..2b82e343 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -33,7 +33,7 @@ sub run { # Construct inst.addrepo arg for ADD_REPOSITORY_VARIATION my $repourl = get_var("ADD_REPOSITORY_VARIATION"); if ($repourl) { - $params .= "inst.addrepo=addrepo," . get_full_repo($repourl) . " "; + $params .= "inst.addrepo=addrepo,$repourl "; } if (get_var("ANACONDA_TEXT")) { $params .= "inst.text "; diff --git a/tests/_check_install_source.pm b/tests/_check_install_source.pm index 099daaec..ae51c70f 100644 --- a/tests/_check_install_source.pm +++ b/tests/_check_install_source.pm @@ -12,6 +12,8 @@ sub run { $repourl = get_mirrorlist_url(); } 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_full_repo($repourl) if ($repourl); $addrepourl = get_var("ADD_REPOSITORY_VARIATION"); diff --git a/tests/disk_custom_blivet_btrfs_preserve_home.pm b/tests/disk_custom_blivet_btrfs_preserve_home.pm index 91936801..243ea134 100644 --- a/tests/disk_custom_blivet_btrfs_preserve_home.pm +++ b/tests/disk_custom_blivet_btrfs_preserve_home.pm @@ -91,7 +91,7 @@ sub run { } # Add new root partition - assert_and_click "anaconda_blivet_part_add"; + assert_and_click "anaconda_add"; # Select the name textfield send_key_until_needlematch("anaconda_blivet_part_name_selected", "tab", 3, 5); # type the new name diff --git a/tests/disk_custom_btrfs_preserve_home.pm b/tests/disk_custom_btrfs_preserve_home.pm index a76928e8..642e05c0 100644 --- a/tests/disk_custom_btrfs_preserve_home.pm +++ b/tests/disk_custom_btrfs_preserve_home.pm @@ -59,7 +59,7 @@ sub run { assert_and_click "anaconda_part_confirm_delete"; # Add the new root partition to the scheme - assert_and_click "anaconda_part_add"; + assert_and_click "anaconda_add"; type_very_safely "/\n"; # Confirm changes diff --git a/tests/disk_custom_resize_lvm.pm b/tests/disk_custom_resize_lvm.pm index ebd9ec2a..6f355efb 100644 --- a/tests/disk_custom_resize_lvm.pm +++ b/tests/disk_custom_resize_lvm.pm @@ -66,7 +66,7 @@ sub run { assert_screen "device_root_resized_thirteen"; # 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 # of the pop-up window, so we only need to fill the value in. diff --git a/tests/disk_custom_with_swap.pm b/tests/disk_custom_with_swap.pm index 3bb6161a..4dfeceb4 100644 --- a/tests/disk_custom_with_swap.pm +++ b/tests/disk_custom_with_swap.pm @@ -21,7 +21,7 @@ sub run { assert_and_click "anaconda_part_update_settings"; wait_still_screen 5; # Add swap - assert_and_click "anaconda_part_add"; + assert_and_click "anaconda_add"; type_very_safely "swap"; send_key "tab"; assert_and_click "anaconda_part_add_mountpoint"; diff --git a/tests/install_source_graphical.pm b/tests/install_source_graphical.pm index 6a648f61..d606df4e 100644 --- a/tests/install_source_graphical.pm +++ b/tests/install_source_graphical.pm @@ -5,14 +5,7 @@ use utils; use anaconda; use Time::HiRes qw( usleep ); -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"; - +sub main_repo { # select appropriate protocol on the network assert_and_click "anaconda_install_source_on_the_network"; send_key "tab"; @@ -56,11 +49,56 @@ sub run { $repourl =~ s/^nfsvers=.://; 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"; # Anaconda hub assert_screen "anaconda_main_hub", 300; + + } sub test_flags {