Skip to content

Commit f994965

Browse files
authored
Merge pull request os-autoinst#21328 from okynos/176781-add-mediacheck-agama
Add scenario for mediacheck of both installation mediums
2 parents 3ea693c + f3f4703 commit f994965

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

lib/Yam/Agama/Pom/GrubMenuAgamaPage.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ sub boot_from_hd {
2929
send_key 'ret';
3030
}
3131

32+
sub check_installation_medium {
33+
my ($self) = @_;
34+
send_key_until_needlematch('grub-menu-agama-mediacheck-highlighted', 'down');
35+
}
36+
3237
sub edit_current_entry { shift->{grub_menu_base}->edit_current_entry() }
3338

3439
1;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
name: agama_check_installation_medium
3+
description: >
4+
Test suite triggers installation medium integrity check and verifies that is successful by checking logs.
5+
schedule:
6+
- yam/agama/agama_check_installation_medium
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Copyright 2025 SUSE LLC
2+
# SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
# Summary: Select Check Installation Medium in Grub then perform boot log inspection to get mediacheck tool result.
5+
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>
6+
7+
use base "installbasetest";
8+
use strict;
9+
use warnings;
10+
use testapi;
11+
use Mojo::Util 'trim';
12+
13+
sub run {
14+
my $grub_menu = $testapi::distri->get_grub_menu_agama();
15+
my $grub_entry_edition = $testapi::distri->get_grub_entry_edition();
16+
my $agama_up_an_running = $testapi::distri->get_agama_up_an_running();
17+
my @params = split ' ', trim(get_var('EXTRABOOTPARAMS', ''));
18+
19+
$grub_menu->expect_is_shown();
20+
$grub_menu->check_installation_medium();
21+
$grub_menu->edit_current_entry();
22+
$grub_entry_edition->move_cursor_to_end_of_kernel_line();
23+
$grub_entry_edition->type(\@params);
24+
$grub_entry_edition->boot();
25+
$agama_up_an_running->expect_is_shown();
26+
27+
select_console 'root-console';
28+
assert_script_run("journalctl -b | grep \"Finished Installation medium integrity check.\"", timeout => 60);
29+
}
30+
31+
1;

0 commit comments

Comments
 (0)