diff --git a/main.pm b/main.pm index 63b872da..632b52af 100644 --- a/main.pm +++ b/main.pm @@ -21,21 +21,24 @@ use autotest; # Boot to anaconda Hub in English autotest::loadtest get_var('CASEDIR')."/tests/_boot_to_anaconda.pm"; -## Disk partitioning -if (get_var('DISK_GUIDED_EMPTY')){ - autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_empty.pm"; -} -elsif (get_var('DISK_GUIDED_MULTI')){ - autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi.pm"; -} - -# Start installation, set user & root passwords, reboot -autotest::loadtest get_var('CASEDIR')."/tests/_do_install_and_reboot.pm"; +unless (get_var("KICKSTART")) +{ + ## Disk partitioning + if (get_var('DISK_GUIDED_EMPTY')){ + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_empty.pm"; + } + elsif (get_var('DISK_GUIDED_MULTI')){ + autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi.pm"; + } + # Start installation, set user & root passwords, reboot + autotest::loadtest get_var('CASEDIR')."/tests/_do_install_and_reboot.pm"; +} # Wait for the login screen autotest::loadtest get_var('CASEDIR')."/tests/_wait_for_login_screen.pm"; + 1; # vim: set sw=4 et: diff --git a/needles/anaconda_install_destination_pony.json b/needles/anaconda_install_destination_pony.json new file mode 100644 index 00000000..f3691abb --- /dev/null +++ b/needles/anaconda_install_destination_pony.json @@ -0,0 +1,17 @@ +{ + "tags": [ + "anaconda_install_destination_pony", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 97, + "ypos": 225, + "width": 32, + "height": 29, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_destination_pony.png b/needles/anaconda_install_destination_pony.png new file mode 100644 index 00000000..e61cae29 Binary files /dev/null and b/needles/anaconda_install_destination_pony.png differ diff --git a/needles/anaconda_install_destination_select_disk_1.json b/needles/anaconda_install_destination_select_disk_1.json index b24285de..b219dddb 100644 --- a/needles/anaconda_install_destination_select_disk_1.json +++ b/needles/anaconda_install_destination_select_disk_1.json @@ -7,18 +7,18 @@ ], "area": [ { - "xpos": 67, - "ypos": 175, - "width": 69, - "height": 71, - "type": "match" + "type": "match", + "width": 64, + "xpos": 86, + "ypos": 177, + "height": 66 }, { - "xpos": 27, - "ypos": 276, - "width": 148, - "height": 24, - "type": "match" + "type": "match", + "height": 30, + "xpos": 58, + "ypos": 274, + "width": 135 } ] } \ No newline at end of file diff --git a/needles/anaconda_install_destination_select_disk_1.png b/needles/anaconda_install_destination_select_disk_1.png index 5e180f6b..adfacdd6 100644 Binary files a/needles/anaconda_install_destination_select_disk_1.png and b/needles/anaconda_install_destination_select_disk_1.png differ diff --git a/needles/anaconda_install_destination_select_disk_2.json b/needles/anaconda_install_destination_select_disk_2.json index b142ca6b..f6bc14af 100644 --- a/needles/anaconda_install_destination_select_disk_2.json +++ b/needles/anaconda_install_destination_select_disk_2.json @@ -1,24 +1,24 @@ { + "area": [ + { + "type": "match", + "width": 73, + "height": 63, + "ypos": 178, + "xpos": 290 + }, + { + "type": "match", + "width": 137, + "height": 30, + "ypos": 275, + "xpos": 266 + } + ], "tags": [ "anaconda_install_destination_select_disk_2", "ENV-DISTRI-fedora", "ENV-INSTLANG-en_US", "ENV-FLAVOR-server" - ], - "area": [ - { - "xpos": 228, - "ypos": 175, - "width": 110, - "height": 76, - "type": "match" - }, - { - "xpos": 211, - "ypos": 277, - "width": 145, - "height": 26, - "type": "match" - } ] } \ No newline at end of file diff --git a/needles/anaconda_install_destination_select_disk_2.png b/needles/anaconda_install_destination_select_disk_2.png index 64115b8a..1a830b37 100644 Binary files a/needles/anaconda_install_destination_select_disk_2.png and b/needles/anaconda_install_destination_select_disk_2.png differ diff --git a/needles/console_password_required.json b/needles/console_password_required.json new file mode 100644 index 00000000..3017dd31 --- /dev/null +++ b/needles/console_password_required.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "xpos": 1, + "ypos": 79, + "width": 77, + "height": 17, + "type": "match" + } + ], + "tags": [ + "console_password_required", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/console_password_required.png b/needles/console_password_required.png new file mode 100644 index 00000000..c79765be Binary files /dev/null and b/needles/console_password_required.png differ diff --git a/needles/root_logged_in.json b/needles/root_logged_in.json new file mode 100644 index 00000000..901d58a5 --- /dev/null +++ b/needles/root_logged_in.json @@ -0,0 +1,17 @@ +{ + "tags": [ + "root_logged_in", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 0, + "ypos": 126, + "width": 156, + "height": 22, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/root_logged_in.png b/needles/root_logged_in.png new file mode 100644 index 00000000..b26ce344 Binary files /dev/null and b/needles/root_logged_in.png differ diff --git a/needles/user_logged_in.json b/needles/user_logged_in.json new file mode 100644 index 00000000..a598a586 --- /dev/null +++ b/needles/user_logged_in.json @@ -0,0 +1,17 @@ +{ + "tags": [ + "user_logged_in", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-FLAVOR-server" + ], + "area": [ + { + "xpos": 1, + "ypos": 94, + "width": 155, + "height": 20, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/user_logged_in.png b/needles/user_logged_in.png new file mode 100644 index 00000000..c11ffb0d Binary files /dev/null and b/needles/user_logged_in.png differ diff --git a/templates b/templates index 6027c2c8..b1043664 100755 --- a/templates +++ b/templates @@ -52,6 +52,30 @@ settings => [ { key => "NUMDISKS", value => "2" }, { key => "DISK_GUIDED_MULTI", value => "1" }, + { key => "HDDMODEL", value => "ide-hd,bus=ahci0.0" }, + ], + variables => "", + }, + { + name => "server_scsi_updates_img", + prio => 3, + settings => [ + { key => "DISK_GUIDED_EMPTY", value => "1" }, + { key => "BOOT_UPDATES_IMG_URL", value => "1" }, + { key => "HDDMODEL", value => "virtio-scsi-pci" }, + ], + variables => "", + }, + { + name => "server_kickstart_user_creation", + prio => 4, + settings => [ + { key => "KICKSTART", value => "1" }, + { key => "BOOT_KICKSTART_HTTP", value => "1" }, + { key => "CHECK_LOGIN", value => "1" }, + { key => "USER_LOGIN", value => "test" }, + { key => "USER_PASSWORD", value => "test" }, + { key => "ROOT_PASSWORD", value => "111111" }, ], variables => "", }, diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 33ef27ed..bff47c99 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -13,17 +13,35 @@ sub run { send_key "up"; } - send_key "ret"; + if ( get_var("KICKSTART") ) + { + if ( get_var("BOOT_KICKSTART_HTTP") ) + { + send_key "tab"; + type_string " inst.ks=http://jskladan.fedorapeople.org/kickstarts/root-user-crypted-net.ks"; + } - # Select install language - assert_screen "anaconda_select_install_lang", 300; - type_string "english"; - assert_and_click "anaconda_select_install_lang_english_filtered"; - assert_screen "anaconda_select_install_lang_english_selected", 3; - assert_and_click "anaconda_select_install_lang_continue"; + send_key "ret"; + } + else + { + if ( get_var("BOOT_UPDATES_IMG_URL") ) + { + send_key "tab"; + type_string " inst.updates=https://fedorapeople.org/groups/qa/updates/updates-unipony.img"; + } - # Anaconda hub - assert_screen "anaconda_main_hub", 300; # + send_key "ret"; + # Select install language + assert_screen "anaconda_select_install_lang", 300; + type_string "english"; + assert_and_click "anaconda_select_install_lang_english_filtered"; + assert_screen "anaconda_select_install_lang_english_selected", 3; + assert_and_click "anaconda_select_install_lang_continue"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + } } diff --git a/tests/_wait_for_bootloader.pm b/tests/_wait_for_bootloader.pm new file mode 100644 index 00000000..e12d5b25 --- /dev/null +++ b/tests/_wait_for_bootloader.pm @@ -0,0 +1,46 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + # Wait for bootloader to appear + + assert_screen "bootloader", 30; + + if ( get_var("FLAVOR") eq "server") + { + # Skip the media check on DVD + send_key "up"; + } + + if ( get_var("BOOT_UPDATES_IMG_URL") ) + { + send_key "tab"; + type_string " inst.updates=https://fedorapeople.org/groups/qa/updates/updates-unipony.img" + } + + send_key "ret"; + + # Select install language + assert_screen "anaconda_select_install_lang", 300; + type_string "english"; + assert_and_click "anaconda_select_install_lang_english_filtered"; + assert_screen "anaconda_select_install_lang_english_selected", 3; + assert_and_click "anaconda_select_install_lang_continue"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # +} + + +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 { milestone => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/_wait_for_login_screen.pm b/tests/_wait_for_login_screen.pm index 41a658b8..56c4bd07 100644 --- a/tests/_wait_for_login_screen.pm +++ b/tests/_wait_for_login_screen.pm @@ -4,8 +4,34 @@ use testapi; sub run { + # If KICKSTART is set, then the wait_time needs to + # consider the install time + my $wait_time = get_var("KICKSTART") ? 600 : 300; + # Reboot and wait for the text login - assert_screen "clean_install_login", 300; + assert_screen "clean_install_login", $wait_time; + + if (get_var("CHECK_LOGIN")) + { + if (get_var("FLAVOR") eq "server") + { + type_string get_var("USER_LOGIN"); + send_key "ret"; + type_string get_var("USER_PASSWORD"); + send_key "ret"; + assert_screen "user_logged_in", 10; + + if (get_var("ROOT_PASSWORD")) + { + type_string "su -"; + send_key "ret"; + assert_screen "console_password_required", 10; + type_string get_var("ROOT_PASSWORD"); + send_key "ret"; + assert_screen "root_logged_in", 10; + } + } + } } diff --git a/tests/disk_guided_empty.pm b/tests/disk_guided_empty.pm index 5d4996cc..1d479134 100644 --- a/tests/disk_guided_empty.pm +++ b/tests/disk_guided_empty.pm @@ -8,6 +8,11 @@ sub run { # Default install destination (hdd should be empty for new KVM machine) assert_and_click "anaconda_main_hub_install_destination"; + + if (get_var('BOOT_UPDATES_IMG_URL')){ + assert_screen "anaconda_install_destination_pony", 30; + } + assert_and_click "anaconda_spoke_done"; # Anaconda hub