Skip to content

Commit

Permalink
Add opensuse_repos test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
lkocman committed May 15, 2024
1 parent c602888 commit 06a589e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions schedule/functional/extra_tests_textmode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ conditional_schedule:
- console/vmstat
- console/kdump_and_crash
- console/ansible
opensuse_repos:
DISTRI:
opensuse:
- console/opensuse_repos
validate_packages_and_patterns:
DISTRI:
sle:
Expand Down Expand Up @@ -161,6 +165,7 @@ schedule:
- console/aaa_base
- console/osinfo_db
- '{{opensuse_tests}}'
- '{{opensuse_repos}}'
- '{{tumbleweed_tests}}'
- console/journalctl
- console/tar
Expand Down
51 changes: 51 additions & 0 deletions tests/console/opensuse_repos.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SUSE's openQA tests
#
# Copyright 2024 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Package: openSUSE-repos
# Summary: Basic checks for openSUSE-repos.

# - Install openSUSE-repos
# - Innstall openSUSE-repos-NVIDIA on aarch64 and x86_64
# - Import gpg keys and refresh repositories
# - Flavors of openSUSE-repos packages correspond with flavor of openSUSE-release
# Maintainer: Lubos Kocmman <[email protected]>

use base "consoletest";
use strict;
use warnings;
use testapi;
use utils;
use version_utils qw(is_tumbleweed is_leap is_leapmicro is_microos is_slowroll);
use serial_terminal 'select_serial_terminal';

sub run {
my $timeout = 300;
my $pkgname = 'openSUSE-repos-Tumbleweed';
select_serial_terminal;

zypper_call "in openSUSE-repos";

$pkgname = 'openSUSE-repos-Leap' if is_leap;
$pkgname = 'openSUSE-repos-LeapMicro' if is_leap_micro;
$pkgname = 'openSUSE-repos-MicroOS' if is_microos;
$pkgname = 'openSUSE-repos-Slowroll' if is_slowroll;

assert_script_run("rpm -q $pkgname");

# NVIDIA repo is available only for x86_64 and aarch64
if (is_x86_64 || is_aarch64) {
zypper_call "in openSUSE-repos-NVIDIA";
assert_script_run("rpm -q $pkgname");
}

# Ensure we can refresh repositories
zypper_call '--gpg-auto-import-keys ref -s';
}

sub test_flags {
return {milestone => 1};
}

1;

0 comments on commit 06a589e

Please sign in to comment.