1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-07-17 10:51:36 +00:00
os-autoinst-distri-fedora/tests/applications/disks/aaa_setup.pm
Lukáš Růžička 0190f38677 Use the new features of menu_launch_type in code.
We have enhanced the menu_launch_type to allow for
start checking and maximizing applications.
This PR uses the new functions wherever it seems
logical.
If special logic was used for certain cases,
we have not touched these to preserve the
exact behaviour.

The crash workaround for the Fonts flatpak is dropped because it
no longer seems to be needed with the latest version of the
flatpak, and dropping it simplifies this migration.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/358
2025-04-25 14:40:54 -07:00

60 lines
1.5 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
use disks;
# This script will prepare a disk image with the size of
# 1 GB and will add two partitions to it. This will serve as
# a milestone for other follow-up tests.
#
# This script will test if Disks can create new partitions
# in an empty disk.
sub run {
my $self = shift;
# Switch to the console and perform some pre-settings.
# Switch to the console
$self->root_console(tty => 3);
# Create a disk image in the home folder. We have decided
# to use truncate to be able to create bigger partitions
# that would not require as much space on the disk when
# empty.
script_run("truncate -s 1G /root/disk.img");
# Connect the created partition to the system as a loop device
# using losetup which will make it accessible to the Disks application
# later.
script_run("losetup -P -f --show /root/disk.img");
# Go back to graphics.
desktop_vt();
# Set the update notification_timestamp
set_update_notification_timestamp();
menu_launch_type("disks", checkstart => 1, maximize => 1);
# Click on the listed icon of the new loop device.
assert_and_click("disks_diskloop_listed");
# Check that the file has been correctly attached.
assert_screen("disks_diskloop_status");
# Format the entire disk with a GPT.
wipe_disk();
# Add partitions.
add_partitions();
}
sub test_flags {
# If this test fails, there is no need to continue.
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: