1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-30 17:33:07 +00:00
os-autoinst-distri-fedora/tests/applications/keyring/aaa_setup.pm
Lukas Ruzicka 992e51f5c5 Create test suite for Desktop Keyring
This adds both the Gnome and the KDE tests to test the
Desktop Keyring. After a discussion with the Brno team,
how this could be tested without the need to rely on
external servers to log into, we set up a local FTP server,
we will log into it and remember the credentials and verify
that the credentials will be stored in the keyring correctly.
2024-06-11 16:04:44 -07:00

43 lines
1.1 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This script will do the following:
# - install Seahorse when on Gnome
# - enable the sshd.service
# - create an SSH key for the installed user (~ test)
# - set up the SSH key password for that key
# - it will set a milestone
sub run {
my $self = shift;
my $desktop = get_var("DESKTOP");
my $user = get_var("USER") || "test";
# Switch to console to perform several setting tasks.
$self->root_console(tty => 3);
# Install Seahorse on Gnome.
# On KDE, similar application is already installed in the system.
if ($desktop eq "gnome") {
assert_script_run("dnf -y install seahorse");
}
# Enable and start sshd.service and check that is is running.
assert_script_run("systemctl enable sshd.service --now");
assert_script_run("systemctl status sshd.service --no-pager");
# Create the SSH keys with password for the regular user.
# Switch to that user's account.
assert_script_run("su $user -c 'ssh-keygen -N sshpassword -f /home/$user/.ssh/id_ed25519'");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: