Skip to content

Commit

Permalink
Merge pull request #13643 from tinawang123/rmtmig
Browse files Browse the repository at this point in the history
Test rmt server before and after migration
  • Loading branch information
lemon-suse committed Nov 11, 2021
2 parents 007d818 + 0cf29df commit 651df5f
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
38 changes: 38 additions & 0 deletions schedule/migration/rmt_host_migration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: rmt_host_migration
description: >
Test rmt server before and after migration
vars:
DESKTOP: gnome
BOOT_HDD_IMAGE: 1
ORIGIN_SYSTEM_VERSION: '%HDDVERSION%'
UPGRADE_TARGET_VERSION: '%VERSION%'
schedule:
- migration/version_switch_origin_system
- '{{online_migration_test}}'
- '{{remove_ltss}}'
- console/rmt/rmt_host_migration
- migration/version_switch_upgrade_target
- migration/online_migration/pre_migration
- '{{migration_method}}'
- migration/online_migration/post_migration
- console/rmt/rmt_host_migration

conditional_schedule:
remove_ltss:
REGRESSION_LTSS:
1:
- migration/online_migration/register_without_ltss
migration_method:
MIGRATION_METHOD:
yast:
- migration/online_migration/yast2_migration
zypper:
- migration/online_migration/zypper_migration
online_migration_test:
ONLINE_MIGRATION:
1:
- installation/isosize
- installation/bootloader
- migration/online_migration/online_migration_setup
- migration/online_migration/register_system
- migration/online_migration/zypper_patch
37 changes: 37 additions & 0 deletions tests/console/rmt/rmt_host_migration.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SUSE's openQA tests
#
# Copyright 2021 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Package: rmt-server
# Summary: This tests rmt server can work before and after migration
# Add rmt configuration test and basic configuration via
# rmt-wizard, enable repo, check repo at base system, then upgrade
# to latest one. It can still work fine.
# Maintainer: Yutao wang <yuwang@suse.com>

use base "consoletest";
use strict;
use warnings;
use testapi;
use repo_tools;

sub run {
select_console 'root-console';

if (check_var('VERSION', get_required_var('ORIGIN_SYSTEM_VERSION'))) {
rmt_wizard();
# Sync from SCC
rmt_sync;
# Enable one product
assert_script_run("rmt-cli product enable sle-module-live-patching/15/x86_64");
}

# After migation, need do rmt sync again
rmt_sync if (check_var('VERSION', get_required_var('UPGRADE_TARGET_VERSION')));

# Before and after migration, both need rmt gets expected product
assert_script_run("rmt-cli product list | grep sle-module-live-patching/15/x86_64");
}

1;

0 comments on commit 651df5f

Please sign in to comment.