1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-21 18:03:11 +00:00

Move the content from i3 library to the files.

Over the time, we have changed the test scripts so that the code
in the i3.pm library was no more needed. The only leftover was the
user config subroutine that could be moved to the only file that was
using it and we could get rid of the library file.
This commit is contained in:
Lukas Ruzicka 2024-09-26 10:54:16 +02:00 committed by Adam Williamson
parent c392480f92
commit 092cc5dd05
6 changed files with 12 additions and 31 deletions

View File

@ -4,7 +4,6 @@ use strict;
use base 'distribution';
use Cwd;
use i3;
# Fedora distribution class

View File

@ -1,24 +0,0 @@
package i3;
use strict;
use base 'Exporter';
use Exporter;
use testapi;
use utils;
our @EXPORT = qw/create_user_i3_config/;
sub create_user_i3_config {
my %args = @_;
my $login = $args{login};
assert_script_run("mkdir -p /home/$login/.config/i3/");
# ensure that no alias of cp prevents an existing config from being overwritten
assert_script_run("/usr/bin/cp -f /etc/i3/config /home/$login/.config/i3/config");
assert_script_run("sed -i '/i3-config-wizard/d' /home/$login/.config/i3/config");
assert_script_run "chown -R $login:$login /home/$login/.config";
assert_script_run "restorecon -vr /home/$login/.config";
}

View File

@ -4,8 +4,6 @@ use strict;
use base 'Exporter';
use Exporter;
use i3;
use lockapi;
use testapi qw(is_serial_terminal :DEFAULT);
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login/;

View File

@ -2,7 +2,6 @@ use base "installedtest";
use strict;
use testapi;
use utils;
use i3;
our $desktop = get_var("DESKTOP");
our $syspwd = get_var("USER_PASSWORD") || "weakpassword";

View File

@ -3,7 +3,6 @@ use strict;
use testapi;
use utils;
use packagetest;
use i3;
# This test sort of covers QA:Testcase_desktop_update_notification
# and QA:Testcase_desktop_error_checks . If it fails, probably *one*
@ -11,6 +10,18 @@ use i3;
# tricky and involves likely-fragile needles to try and figure out
# what notifications we have).
sub create_user_i3_config {
my %args = @_;
my $login = $args{login};
assert_script_run("mkdir -p /home/$login/.config/i3/");
# ensure that no alias of cp prevents an existing config from being overwritten
assert_script_run("/usr/bin/cp -f /etc/i3/config /home/$login/.config/i3/config");
assert_script_run("sed -i '/i3-config-wizard/d' /home/$login/.config/i3/config");
assert_script_run "chown -R $login:$login /home/$login/.config";
assert_script_run "restorecon -vr /home/$login/.config";
}
sub run {
my $self = shift;
my $desktop = get_var("DESKTOP");

View File

@ -2,8 +2,6 @@ use base "installedtest";
use strict;
use testapi;
use utils;
use i3;
sub run {
my $password = get_var('USER_PASSWORD', 'weakpassword');