Skip to content

Commit

Permalink
Add verification modules for autoyast_lvm
Browse files Browse the repository at this point in the history
  • Loading branch information
JRivrain committed Jul 16, 2020
1 parent 54792e0 commit 261d745
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
35 changes: 35 additions & 0 deletions schedule/yast/autoyast/autoyast_lvm.yaml
Expand Up @@ -21,3 +21,38 @@ schedule:
- autoyast/autoyast_reboot
- installation/grub_test
- installation/first_boot
- autoyast/verify_cloned_profile
- autoyast/verify_lvm_partitions
test_data:
profile:
partitioning:
- drive:
unique_key: device
device: /dev/system
partitions:
- partition:
unique_key: lv_name
lv_name: root_lv
mount: /
- partition:
unique_key: lv_name
lv_name: opt_lv
mount: /opt
- partition:
unique_key: lv_name
lv_name: swap_lv
mount: swap
- drive:
unique_key: device
device: /dev/sda
partitions:
- partition:
unique_key: partition_nr
partition_nr: 1
lvm_group: system
- partition:
unique_key: partition_nr
partition_nr: 2
- partition:
unique_key: partition_nr
partition_nr: 3
28 changes: 28 additions & 0 deletions tests/autoyast/verify_lvm_partitions.pm
@@ -0,0 +1,28 @@
# SUSE's openQA tests
#
# Copyright © 2020 SUSE LLC
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#
# Summary: Verify lvm partitions after autoyast installation

use strict;
use warnings;
use parent 'installbasetest';
use testapi;
use scheduler 'get_test_suite_data';

sub run {
my $test_data = get_test_suite_data();

my $vg = $test_data->{profile}->{partitioning}->[1]->{drive}->{partitions}->[0]->{partition}->{lvm_group};
assert_script_run("vgdisplay $vg");
foreach my $partition (@{$test_data->{profile}->{partitioning}->[0]->{drive}->{partitions}}) {
assert_script_run("lvdisplay /dev/$vg/$partition->{partition}->{lv_name}");
}
}

1;

0 comments on commit 261d745

Please sign in to comment.