Skip to content

Commit

Permalink
Add verify_consistency_self_update and verify_yast2_control_center tests
Browse files Browse the repository at this point in the history
These tests will add the self update repository and update the system.
After that, it will be checked that YaST control center can be opened
with both the Qt and Ncurses interfaces.
  • Loading branch information
paolostivanin committed Jul 15, 2024
1 parent 7d7ff65 commit 7efb68d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/y2_module_consoletest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ sub yast2_console_exec {
$cmd_start = y2_module_basetest::with_yast_env_variables($args{extra_vars}) . $args{podman};
$module_name = 'podman-status';
}
if (!defined($args{yast2_module})) {
$cmd_start = y2_module_basetest::with_yast_env_variables($args{extra_vars}) . ' yast2 ';
$cmd_start .= ';';
$module_name = 'yast2-ui-status';
}
if (!script_run($cmd_start . " echo $module_name-\$? > /dev/$serialdev", 0)) {
return $module_name;
} else {
Expand Down
10 changes: 10 additions & 0 deletions schedule/yam/test_cases/verify_consistency_self_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: verify_consistency_self_update
description: >
Verify consistency of a given self update channel by adding just the self update repo to
a GA system, using zypper dup to update the system and the opening YaST2 control center using
both the Qt and ncurses interfaces.
schedule:
- installation/bootloader_start
- boot/boot_to_desktop
- console/consoletest_setup
- yam/verify_consistency_self_update
34 changes: 34 additions & 0 deletions tests/yam/verify_consistency_self_update.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2024 SUSE LLC
#
# Summary: Update the system using the specified repo and then
# open and close YaST2 control center using both Qt and Ncurses interfaces.
#
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>

use base "consoletest";
use strict;
use warnings;
use testapi;
use utils;
use y2_module_guitest;
use y2_module_consoletest;

sub run {
select_console 'root-console';

zypper_call 'ar -f ' . get_var('SELF_UPDATE_REPO') . ' self-update-repo';
zypper_call 'dup';
zypper_call 'lr --uri';

y2_module_consoletest::yast2_console_exec(yast2_module => '', match_timeout => 180);
assert_screen 'yast2-control-center-ncurses';
wait_screen_change { send_key 'alt-q'; };

select_console 'x11';
y2_module_guitest::launch_yast2_module_x11('', target_match => 'yast2-control-center-ui', match_timeout => 180);
wait_screen_change { send_key 'alt-f4'; };

select_console 'root-console';
}

1;

0 comments on commit 7efb68d

Please sign in to comment.