1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-26 23:53:08 +00:00

Added few more tests

This commit is contained in:
Josef Skladanka 2015-01-27 13:35:27 +01:00
parent 780a9afbba
commit 47e8c38dca
18 changed files with 236 additions and 46 deletions

23
main.pm
View File

@ -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:

View 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"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -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
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -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"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View 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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

View File

@ -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 => "",
},

View File

@ -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; #
}
}

View 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:

View File

@ -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;
}
}
}
}

View File

@ -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