1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-24 23:03:08 +00:00

Fixes for Active Directory client tests

abbra told me where I was going wrong with the 'expected' target
of the getent command ("AD/" is not a magic string, it's just
"(netbiosname)/", and our netbios name is "SAMDOM"...) so this
fixes that too, trying to avoid hard-coding stuff.

For the kickstart test, it seems like it's a timing issue. We
added this 'install sssd-tools and enable debugging' step to try
and debug it, and instead it fixed it. So...let's just stick
with this, for now, because it's useful to have this debugging
anyway. If the problem starts happening again, we can fiddle
about with it more.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-08-04 13:47:33 +01:00
parent 601d0c4f96
commit cba1d29a24

View File

@ -6,7 +6,9 @@ use utils;
sub run {
my $self = shift;
my $admin = get_var("REALMD_ADMIN_USER", "admin");
my $tcadmin = ucfirst($admin);
my $domain = get_var("REALMD_DOMAIN", "test.openqa.fedoraproject.org");
my $shortdom = uc((split(/\./, $domain))[0]);
my $udomain = uc($domain);
my $qdomain = quotemeta($domain);
my $qudomain = uc($qdomain);
@ -15,10 +17,22 @@ sub run {
# at tty1)
send_key "ctrl-alt-f1";
wait_still_screen 1;
if (get_var("KICKSTART")) {
# we don't have sssd debugging enabled yet, so let's do
# that. as a bonus, this seems to avoid a timing issue
# with the AD kickstart test
assert_script_run 'dnf -y install sssd-tools', 240;
assert_script_run 'sss_debuglevel 9';
}
# check domain is listed in 'realm list'
validate_script_output 'realm list', sub { $_ =~ m/domain-name: $qdomain.*configured: kerberos-member/s };
# check we can resolve domain accounts
assert_script_run "getent passwd $admin\@$udomain";
if ($domain =~ m/samdom/) {
assert_script_run "getent passwd '$shortdom\\$tcadmin'";
}
else {
assert_script_run "getent passwd $admin\@$udomain";
}
# check keytab entries
# on AD clients, this isn't automatically installed
assert_script_run "dnf -y install krb5-workstation", 180;