diff --git a/schedule/yast/autoyast/autoyast_lvm.yaml b/schedule/yast/autoyast/autoyast_lvm.yaml index c8f7fb377d43..fc71591fc431 100644 --- a/schedule/yast/autoyast/autoyast_lvm.yaml +++ b/schedule/yast/autoyast/autoyast_lvm.yaml @@ -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 diff --git a/tests/autoyast/verify_lvm_partitions.pm b/tests/autoyast/verify_lvm_partitions.pm new file mode 100644 index 000000000000..a2fd83652748 --- /dev/null +++ b/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 + +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;