Added few more tests
19
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')){
|
||||
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')){
|
||||
}
|
||||
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";
|
||||
}
|
||||
|
||||
# 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:
|
||||
|
17
needles/anaconda_install_destination_pony.json
Normal file
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/anaconda_install_destination_pony.png
Normal file
After Width: | Height: | Size: 82 KiB |
@ -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
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 87 KiB |
17
needles/console_password_required.json
Normal file
@ -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"
|
||||
]
|
||||
}
|
BIN
needles/console_password_required.png
Normal file
After Width: | Height: | Size: 1021 B |
17
needles/root_logged_in.json
Normal file
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/root_logged_in.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
17
needles/user_logged_in.json
Normal file
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/user_logged_in.png
Normal file
After Width: | Height: | Size: 1011 B |
24
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 => "",
|
||||
},
|
||||
|
@ -13,8 +13,25 @@ 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";
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
send_key "ret";
|
||||
# Select install language
|
||||
assert_screen "anaconda_select_install_lang", 300;
|
||||
type_string "english";
|
||||
@ -24,6 +41,7 @@ sub run {
|
||||
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
46
tests/_wait_for_bootloader.pm
Normal file
@ -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:
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|