os-autoinst-distri-rocky/tests/disk_custom_with_swap_postinstall.pm
Adam Williamson 232b224d22 Add 'with swap' tests, drop swap parts from other tests (#180)
In Fedora 33, we generally no longer include a disk-based swap
partition by default (instead swap-on-ZRAM is used, see
https://fedoraproject.org/wiki/Changes/SwapOnZRAM ). This tweaks
our tests to account for that. In tests that aren't to do with
swap at all, we stop including a swap partition in order to be
closer to the default layout. We replace the old _no_swap blivet
and custom tests with _with_swap tests that, as the name implies,
*explicitly include* a swap partition, and adjust the postinstall
test to check the disk swap partition is there.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-08-11 15:09:33 -07:00

19 lines
402 B
Perl

use base "installedtest";
use strict;
use testapi;
sub run {
assert_screen "root_console";
# this is basically asserting that if we list all swaps and grep
# out any zram ones, we still have one at prio -2, which should
# be the disk-based one
assert_script_run 'swapon --show | grep -v zram | grep "\-2"';
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et: