From 376ec0d81b390df1a56d3b8a02dd02f943fdebed Mon Sep 17 00:00:00 2001 From: Josef Skladanka Date: Wed, 4 Feb 2015 14:45:37 +0100 Subject: [PATCH] Inst-repo HTTP variation --- main.pm | 6 ++- ...all_source_check_repo_added_inst_repo.json | 18 +++++++ ...tall_source_check_repo_added_inst_repo.png | Bin 0 -> 1629 bytes templates | 8 +++ tests/_boot_to_anaconda.pm | 19 +++++++ tests/install_source_graphical.pm | 4 +- tests/install_source_variation.pm | 47 ++++++++++++++++++ 7 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 needles/anaconda_install_source_check_repo_added_inst_repo.json create mode 100644 needles/anaconda_install_source_check_repo_added_inst_repo.png create mode 100644 tests/install_source_variation.pm diff --git a/main.pm b/main.pm index 60c1a445..f83c16e3 100644 --- a/main.pm +++ b/main.pm @@ -31,10 +31,14 @@ else unless (get_var("KICKSTART")) { - ## Select installation source + ## Installation source if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL")){ autotest::loadtest get_var('CASEDIR')."/tests/install_source_graphical.pm"; } + if (get_var("REPOSITORY_VARIATION")){ + autotest::loadtest get_var('CASEDIR')."/tests/install_source_variation.pm"; + } + ## Select minimal flavor if (get_var("FLAVOR") eq "server") { diff --git a/needles/anaconda_install_source_check_repo_added_inst_repo.json b/needles/anaconda_install_source_check_repo_added_inst_repo.json new file mode 100644 index 00000000..6f0a5850 --- /dev/null +++ b/needles/anaconda_install_source_check_repo_added_inst_repo.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 229, + "ypos": 17, + "width": 327, + "height": 15, + "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_inst_repo.png b/needles/anaconda_install_source_check_repo_added_inst_repo.png new file mode 100644 index 0000000000000000000000000000000000000000..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A#`?jB(M(h?-=vvGBua>5=!%M%Yxz^<#a7iunRtT)3pZf-EF19Y1q#*@dKW{|xX z@7>;bii*B)kQ52wDqCLXpItT)2DRynBE{j!&e}N~@>97n?P6w+Y6tWu(UES zH>1u!NPikP)6s@c4(N_CqRxZ+d;U*4b@$~MkX^HwH@Vkpu4+bsI~?#5|KlqVqnOZa zE3?s(+j)A=WrYXX-xy`=M4LDo*aygP0<+CT*PMAxs}0{oUR}ShjQ)GWJgEl1>Eh;N z?JBt!UZ{!?e#FM*;UEk2vbe=s91=hh)qTK|Ln{-@t{B=ezA7=e!X}n0DEgEOr7QR#Qy;ESk03F literal 0 HcmV?d00001 diff --git a/templates b/templates index 9ce2270e..d4f35f73 100755 --- a/templates +++ b/templates @@ -104,5 +104,13 @@ ], variables => "", }, + { + name => "server_repository_http_variation", + prio => 8, + settings => [ + { key => "REPOSITORY_VARIATION", value => "1" }, + ], + variables => "", + }, ], } diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 74900349..25c1b538 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -16,6 +16,25 @@ sub run { if( get_var("GRUB")){ send_key "tab"; type_string " ".get_var("GRUB"); + + } + + if (get_var("REPOSITORY_VARIATION")){ + unless (get_var("GRUB")){ + 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]; + } + + $repourl = "http://download.fedoraproject.org/pub/fedora/linux/development/".$fedora_version."/".get_var("ARCH")."/os"; + type_string " inst.repo=".$repourl; } send_key "ret"; diff --git a/tests/install_source_graphical.pm b/tests/install_source_graphical.pm index 4ce1f0fa..b9cb79ea 100644 --- a/tests/install_source_graphical.pm +++ b/tests/install_source_graphical.pm @@ -53,9 +53,9 @@ sub run { assert_screen "anaconda_main_hub", 300; # check that the repo was used - send_key "ctrl-alt-f3"; + send_key "ctrl-alt-f2"; wait_idle 10; - type_string "grep \"".$repourl."\" /tmp/packaging.log | grep \"added repo\""; + 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"; diff --git a/tests/install_source_variation.pm b/tests/install_source_variation.pm new file mode 100644 index 00000000..95903ce8 --- /dev/null +++ b/tests/install_source_variation.pm @@ -0,0 +1,47 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + # !!! GRUB parameter is set in _boot_to_anaconda.pm !!! + + # Anaconda hub + assert_screen "anaconda_main_hub"; + + # FIXME: this code is scattered in at least three places (here, _boot_to_anaconda, _install_source_graphical. Deduplicate + my $fedora_version = ""; + my $repourl = ""; + + if (get_var("VERSION") eq "rawhide"){ + $fedora_version = "rawhide"; + } + else { + $fedora_version = (split /_/, get_var("BUILD"))[0]; + } + + $repourl = "download.fedoraproject.org/pub/fedora/linux/development/".$fedora_version."/".get_var("ARCH")."/os"; + + # check that the repo was used + send_key "ctrl-alt-f2"; + 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: