add disk guided free space test

This commit is contained in:
Garret Raziel 2015-03-05 11:44:02 +01:00 committed by geekotest
parent 2191f7a5c5
commit 41d859cc7d
3 changed files with 53 additions and 8 deletions

10
main.pm
View File

@ -75,15 +75,15 @@ else
} }
autotest::loadtest get_var('CASEDIR')."/tests/_wait_for_login_screen.pm"; autotest::loadtest get_var('CASEDIR')."/tests/_wait_for_login_screen.pm";
if (get_var('DISK_GUIDED_MULTI')) if (get_var('DISK_GUIDED_MULTI')) {
{
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_postinstall.pm"; autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi_postinstall.pm";
} }
elsif (get_var('DISK_GUIDED_DELETE_PARTIAL')) {
if (get_var('DISK_GUIDED_DELETE_PARTIAL'))
{
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_partial_postinstall.pm"; autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_partial_postinstall.pm";
} }
elsif (get_var('DISK_GUIDED_FREE_SPACE')) {
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_free_space_postinstall.pm";
}
} }

View File

@ -96,6 +96,16 @@
}, },
test_suite => { name => "server_simple_encrypted" }, test_suite => { name => "server_simple_encrypted" },
}, },
{
machine => { name => "64bit" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "server",
version => "rawhide",
},
test_suite => { name => "server_simple_free_space" },
},
], ],
Machines => [ Machines => [
{ {
@ -207,11 +217,21 @@
}, },
{ {
name => "server_simple_encrypted", name => "server_simple_encrypted",
prio => 9, prio => 10,
settings => [ settings => [
{ key => "ENCRYPT_PASSWORD", value => "weakpassword" }, { key => "ENCRYPT_PASSWORD", value => "weakpassword" },
], ],
variables => "", variables => "",
}, },
{
name => "server_simple_free_space",
prio => 11,
settings => [
{ key => "DISK_GUIDED_FREE_SPACE", value => "1" },
{ key => "HDD_1", value => "disk_freespace.img" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
],
variables => "",
},
], ],
} }

View File

@ -0,0 +1,25 @@
use base "basetest";
use strict;
use testapi;
sub run {
assert_screen "root_logged_in";
type_string "reset; mount /dev/vda1 /mnt; echo $?";
send_key "ret";
assert_screen "console_command_success";
type_string "reset; cat /mnt/testfile";
send_key "ret";
assert_screen "provided_disk_intact";
}
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: