mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-19 19:51:25 +00:00
add disk guided free space test
This commit is contained in:
parent
2191f7a5c5
commit
41d859cc7d
14
main.pm
14
main.pm
@ -47,10 +47,10 @@ else
|
||||
|
||||
|
||||
## Disk partitioning
|
||||
if (get_var('DISK_GUIDED_MULTI')){
|
||||
if (get_var('DISK_GUIDED_MULTI')) {
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_multi.pm";
|
||||
}
|
||||
elsif (get_var('DISK_GUIDED_DELETE_ALL')){
|
||||
elsif (get_var('DISK_GUIDED_DELETE_ALL')) {
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_delete_all.pm";
|
||||
}
|
||||
elsif (get_var('DISK_GUIDED_DELETE_PARTIAL')) {
|
||||
@ -75,15 +75,15 @@ else
|
||||
}
|
||||
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";
|
||||
}
|
||||
|
||||
if (get_var('DISK_GUIDED_DELETE_PARTIAL'))
|
||||
{
|
||||
elsif (get_var('DISK_GUIDED_DELETE_PARTIAL')) {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
22
templates
22
templates
@ -96,6 +96,16 @@
|
||||
},
|
||||
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 => [
|
||||
{
|
||||
@ -207,11 +217,21 @@
|
||||
},
|
||||
{
|
||||
name => "server_simple_encrypted",
|
||||
prio => 9,
|
||||
prio => 10,
|
||||
settings => [
|
||||
{ key => "ENCRYPT_PASSWORD", value => "weakpassword" },
|
||||
],
|
||||
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 => "",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
25
tests/disk_guided_free_space_postinstall.pm
Normal file
25
tests/disk_guided_free_space_postinstall.pm
Normal 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:
|
Loading…
Reference in New Issue
Block a user