Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt partitioning_lvm for *activate_existing* tests to storage_ng #4354

Merged
merged 1 commit into from
Feb 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 10 additions & 7 deletions lib/partition_setup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,17 @@ sub unselect_xen_pv_cdrom {
sub enable_encryption_guided_setup {
my $self = shift;
send_key $cmd{encryptdisk};
if (!get_var('ENCRYPT_ACTIVATE_EXISTING')) {
assert_screen 'inst-encrypt-password-prompt';
type_password;
send_key 'tab';
type_password;
send_key $cmd{next};
installation_user_settings::await_password_check;
# Bug is only in old storage stack
if (get_var('ENCRYPT_ACTIVATE_EXISTING') && !is_storage_ng) {
record_info 'bsc#993247 https://fate.suse.com/321208', 'activated encrypted partition will not be recreated as encrypted';
return;
}
assert_screen 'inst-encrypt-password-prompt';
type_password;
send_key 'tab';
type_password;
send_key $cmd{next};
installation_user_settings::await_password_check;
}

1;
Expand Down
45 changes: 8 additions & 37 deletions tests/installation/partitioning_lvm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,16 @@ sub run {
my $self = shift;
my $file_system_tags = [
qw(
partitioning-no-root-filesystem partitioning-encrypt-activated-existing
partitioning-encrypt-activated-existing
partitioning-encrypt-ignored-existing
)];
my $collect_logs = 0;

if (get_var('ENCRYPT_ACTIVATE_EXISTING')) {
assert_screen $file_system_tags;
if (match_has_tag('partitioning-no-root-filesystem')) {
record_soft_failure 'bsc#989750';
$collect_logs = 1;
}
elsif (match_has_tag('partitioning-encrypt-ignored-existing')) {
if (match_has_tag('partitioning-encrypt-ignored-existing')) {
record_info 'bsc#993247 https://fate.suse.com/321208', 'activated encrypted partition will not be recreated as encrypted';
}

unless (get_var('ENCRYPT_FORCE_RECOMPUTE')) {
$self->save_logs_and_resume() if $collect_logs;
return;
}
return unless (get_var('ENCRYPT_FORCE_RECOMPUTE'));
}

# Storage NG introduces a new partitioning dialog. partitioning.pm detects this by the existence of the "Guided Setup" button
Expand All @@ -62,7 +53,7 @@ sub run {
my $numdisks = get_var("NUMDISKS");
print "NUMDISKS = $numdisks\n";

assert_screen [qw(inst-partition-radio-buttons inst-partition-guided inst-partitioning-scheme)];
assert_screen [qw(inst-partition-radio-buttons inst-partition-guided inst-partitioning-scheme inst-select-disk-to-use-as-root )];
if (match_has_tag('inst-partition-radio-buttons')) { # detect whether new (Radio Buttons) YaST behaviour
if (get_var("ENCRYPT")) {
send_key "alt-e";
Expand All @@ -80,25 +71,11 @@ sub run {
send_key 'alt-l';
}
send_key 'alt-o';
assert_screen [qw(partition-lvm-new-summary partitioning-encrypt-activated-existing partitioning-encrypt-broke-existing)];
if (match_has_tag('partitioning-encrypt-broke-existing')) {
record_soft_failure 'bsc#993249';
$collect_logs = 1;
}
assert_screen [qw(partition-lvm-new-summary partitioning-encrypt-activated-existing)];
}
elsif (is_storage_ng) {
if ($numdisks <= 1) {
die "Guided workflow does not skip disk selection when only one disk!"
unless match_has_tag('inst-partitioning-scheme');
}
else {
die "Guided workflow does skip disk selection when more than one disk! (NUMDISKS=$numdisks)"
unless match_has_tag('inst-partition-guided');
assert_screen "inst-partition-guided";
send_key 'alt-n';
assert_screen "inst-select-root-disk";
send_key 'alt-n';
}
send_key $cmd{next} if (match_has_tag('inst-select-disk-to-use-as-root'));

send_key $cmd{enablelvm};
assert_screen "inst-partitioning-lvm-enabled";
if (get_var("ENCRYPT")) {
Expand All @@ -109,11 +86,7 @@ sub run {
}
assert_screen "inst-filesystem-options";
send_key 'alt-n';
assert_screen [qw(partition-lvm-new-summary partitioning-encrypt-activated-existing partitioning-encrypt-broke-existing)];
if (match_has_tag('partitioning-encrypt-broke-existing')) {
record_soft_failure 'bsc#993249';
$collect_logs = 1;
}
assert_screen [qw(partition-lvm-new-summary partitioning-encrypt-activated-existing)];
if (get_var("ENCRYPT")) {
assert_screen "partitioning-encrypt-activated";
}
Expand All @@ -134,8 +107,6 @@ sub run {
}
send_key "alt-o";
}

$self->save_logs_and_resume() if $collect_logs;
}

1;
Expand Down