diff --git a/main.pm b/main.pm index 7f0a99e9..05ddc1f1 100644 --- a/main.pm +++ b/main.pm @@ -30,10 +30,17 @@ else unless (get_var("KICKSTART")) { - # Select minimal flavor - if (get_var("FLAVOR") eq "server") { - autotest::loadtest get_var('CASEDIR')."/tests/_select_minimal.pm"; - } + + ## Select installation source + if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL")){ + autotest::loadtest get_var('CASEDIR')."/tests/install_source_graphical.pm"; + } + + ## Select minimal flavor + if (get_var("FLAVOR") eq "server") { + autotest::loadtest get_var('CASEDIR')."/tests/_select_minimal.pm"; + } + ## Disk partitioning if (get_var('DISK_GUIDED_EMPTY')){ diff --git a/needles/anaconda_install_source_check_repo_added.json b/needles/anaconda_install_source_check_repo_added.json new file mode 100644 index 00000000..791118e4 --- /dev/null +++ b/needles/anaconda_install_source_check_repo_added.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 98, + "ypos": 29, + "width": 313, + "height": 19, + "type": "match" + } + ], + "tags": [ + "anaconda_install_source_check_repo_added", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_source_check_repo_added.png b/needles/anaconda_install_source_check_repo_added.png new file mode 100644 index 00000000..4d7ee2b9 Binary files /dev/null and b/needles/anaconda_install_source_check_repo_added.png differ diff --git a/needles/anaconda_install_source_http_selected.json b/needles/anaconda_install_source_http_selected.json new file mode 100644 index 00000000..1a6d0c1d --- /dev/null +++ b/needles/anaconda_install_source_http_selected.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_install_source_http_selected", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 56, + "ypos": 163, + "width": 115, + "height": 21, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_source_http_selected.png b/needles/anaconda_install_source_http_selected.png new file mode 100644 index 00000000..b12d35a6 Binary files /dev/null and b/needles/anaconda_install_source_http_selected.png differ diff --git a/needles/anaconda_install_source_on_the_network.json b/needles/anaconda_install_source_on_the_network.json new file mode 100644 index 00000000..79a4eb13 --- /dev/null +++ b/needles/anaconda_install_source_on_the_network.json @@ -0,0 +1,18 @@ +{ + "tags": [ + "anaconda_install_source_on_the_network", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 58, + "ypos": 128, + "width": 108, + "height": 20, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_source_on_the_network.png b/needles/anaconda_install_source_on_the_network.png new file mode 100644 index 00000000..af90ec42 Binary files /dev/null and b/needles/anaconda_install_source_on_the_network.png differ diff --git a/needles/anaconda_install_source_repo_select_mirrorlist.json b/needles/anaconda_install_source_repo_select_mirrorlist.json new file mode 100644 index 00000000..7f0b0e76 --- /dev/null +++ b/needles/anaconda_install_source_repo_select_mirrorlist.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 178, + "ypos": 195, + "width": 238, + "height": 26, + "type": "match" + } + ], + "tags": [ + "anaconda_install_source_repo_select_mirrorlist", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_source_repo_select_mirrorlist.png b/needles/anaconda_install_source_repo_select_mirrorlist.png new file mode 100644 index 00000000..a814f481 Binary files /dev/null and b/needles/anaconda_install_source_repo_select_mirrorlist.png differ diff --git a/needles/anaconda_main_hub_installation_source.json b/needles/anaconda_main_hub_installation_source.json new file mode 100644 index 00000000..24f791bf --- /dev/null +++ b/needles/anaconda_main_hub_installation_source.json @@ -0,0 +1,25 @@ +{ + "tags": [ + "anaconda_main_hub_installation_source", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 185, + "ypos": 347, + "width": 72, + "height": 61, + "type": "match" + }, + { + "xpos": 267, + "ypos": 348, + "width": 199, + "height": 29, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_main_hub_installation_source.png b/needles/anaconda_main_hub_installation_source.png new file mode 100644 index 00000000..eab245ac Binary files /dev/null and b/needles/anaconda_main_hub_installation_source.png differ diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index d7fcd872..6ee5d58e 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -39,9 +39,9 @@ sub run { assert_screen "anaconda_select_install_lang_english_selected", 3; assert_and_click "anaconda_select_install_lang_continue"; - if ( get_var("VERSION") eq "rawhide") { - assert_and_click "anaconda_rawhide_accept_fate"; - } + if ( get_var("VERSION") eq "rawhide") { + assert_and_click "anaconda_rawhide_accept_fate"; + } # Anaconda hub assert_screen "anaconda_main_hub", 300; # diff --git a/tests/install_source_graphical.pm b/tests/install_source_graphical.pm new file mode 100644 index 00000000..4ce1f0fa --- /dev/null +++ b/tests/install_source_graphical.pm @@ -0,0 +1,78 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + + # Go into the Install Sourcre spoke + assert_and_click "anaconda_main_hub_installation_source"; + + + + # select "http" on the network + assert_and_click "anaconda_install_source_on_the_network"; + send_key "tab"; + for (my $i=0; $i<4; $i++){ + send_key "up"; + } + assert_screen "anaconda_install_source_http_selected"; + + + # insert the url + send_key "tab"; + my $fedora_version = ""; + my $repourl = ""; + if (get_var("VERSION") eq "rawhide"){ + $fedora_version = "rawhide"; + } + else { + $fedora_version = (split /_/, get_var("BUILD"))[0]; + + if (get_var("MIRRORLIST_GRAPHICAL")){ + $fedora_version = "fedora-".$fedora_version; + } + } + + if (get_var("MIRRORLIST_GRAPHICAL")){ + $repourl = "mirrors.fedoraproject.org/mirrorlist?repo=".$fedora_version."&arch=".get_var('ARCH'); + type_string $repourl; + + # select as mirror list + assert_and_click "anaconda_install_source_repo_select_mirrorlist"; + } + elsif (get_var("REPOSITORY_GRAPHICAL")){ + $repourl = "download.fedoraproject.org/pub/fedora/linux/development/".$fedora_version."/".get_var("ARCH")."/os"; + type_string $repourl; + } + + assert_and_click "anaconda_spoke_done"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; + + # check that the repo was used + send_key "ctrl-alt-f3"; + wait_idle 10; + type_string "grep \"".$repourl."\" /tmp/packaging.log | grep \"added repo\""; + send_key "ret"; + assert_screen "anaconda_install_source_check_repo_added"; + send_key "ctrl-alt-f6"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 30; # + +} + +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: