Skip to content

Commit

Permalink
Merge pull request #16848 from rfan1/patterns
Browse files Browse the repository at this point in the history
Upload zypper log if any issue with test 'patterns'
  • Loading branch information
rfan1 committed Apr 13, 2023
2 parents 224b4e0 + d1eb40c commit 6c38a55
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/console/patterns.pm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SUSE's openQA tests
#
# Copyright 2016-2017 SUSE LLC
# Copyright 2016-2023 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Summary: Test pattern selection for system role 'kvm host'
# Maintainer: Christopher Hofmann <cwh@suse.de>
# Maintainer: Christopher Hofmann <cwh@suse.de>, QE Core <qe-core@suse.de>
# Tags: fate#317481 poo#16650

use base 'consoletest';
Expand All @@ -20,7 +20,13 @@ sub run {
# defines kvm_server as an additional pattern, xen_server defines 'xen host'.
die "Only kvm|xen roles are supported" unless get_var('SYSTEM_ROLE', '') =~ /kvm|xen/;
my $pattern_name = get_required_var('SYSTEM_ROLE') . '_server';
record_info('Show only installed patterns', script_output('zypper patterns -i'));
assert_script_run("zypper patterns -i | grep $pattern_name");
}

sub post_fail_hook {
select_console 'log-console';
upload_logs "/var/log/zypper.log";
}

1;

0 comments on commit 6c38a55

Please sign in to comment.