Skip to content

Commit

Permalink
Agama: implement workaround for selinux bsc#1230121
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredi committed Oct 22, 2024
1 parent 673ca03 commit 304ed5d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Distribution/Sle/AgamaDevel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
package Distribution::Sle::AgamaDevel;
use strict;
use warnings FATAL => 'all';
use testapi;
use parent 'Distribution::Opensuse::Leap::16Latest';

use Yam::Agama::Pom::GrubMenuBasePage;
use Yam::Agama::Pom::GrubMenuSlesPage;
use Yam::Agama::Pom::AgamaUpAndRunningBasePage;
use Yam::Agama::Pom::GrubMenuSlesPageBug1230121;
use Yam::Agama::Pom::AgamaUpAndRunningSlePage;

sub get_grub_menu_installed_system {
return Yam::Agama::Pom::GrubMenuSlesPage->new({
return get_var('WORKAROUND_BSC_1230121') ?
Yam::Agama::Pom::GrubMenuSlesPageBug1230121->new({
grub_menu_base => Yam::Agama::Pom::GrubMenuBasePage->new()})
: Yam::Agama::Pom::GrubMenuSlesPage->new({
grub_menu_base => Yam::Agama::Pom::GrubMenuBasePage->new()});
}

Expand Down
43 changes: 43 additions & 0 deletions lib/Yam/Agama/Pom/GrubMenuSlesPageBug1230121.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SUSE's openQA tests
#
# Copyright 2024 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Summary: Handles grub screen in SLES 16 for bug bsc#1230121.
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>

package Yam::Agama::Pom::GrubMenuSlesPageBug1230121;
use strict;
use warnings;
use testapi;

sub new {
my ($class, $args) = @_;
return bless {
grub_menu_base => $args->{grub_menu_base},
tag_first_entry_highlighted => 'grub-menu-sles16-highlighted',
}, $class;
}

sub expect_is_shown {
my ($self) = @_;
assert_screen($self->{tag_first_entry_highlighted}, 60);
}

sub edit_current_entry { shift->{grub_menu_base}->edit_current_entry() }

sub select_first_entry {
my ($self) = @_;
record_soft_failure("bsc#1230121 - Agama-live SLES-16 Alpha installation. Unable to login after installation");
$self->edit_current_entry();
send_key_until_needlematch('linux-line-selected', 'down', 26);
wait_screen_change { send_key('end') };
wait_still_screen(1);
send_key('backspace');
type_string('0');
wait_still_screen(1);
save_screenshot;
send_key('ctrl-x');
}

1;

0 comments on commit 304ed5d

Please sign in to comment.