/prut

Upgradability test for 3rd party applications

Primary LanguageShellMIT LicenseMIT

Upgradability test for 3rd party applications

Purpose of this tmt test plan is to simplify upgradability testing of 3rd party apllication on RHEL.

All steps of the test plan are implemented as POSIX compliant shell scripts, therefore there are almost no dependencies (except tmt, see Prerequisites section) to run the plan.

Prerequisites

  1. Fully updated VM with RHEL content (e.g. from Developer Subscription).
    • For RHEL 7 system, extras repo is needed to get leapp, e.g.
      subscription-manager repos --enable rhel-7-server-extras-rpms
  2. SSH public keys for root user are present on the VM, e.g.
    ssh-copy-id root@${VM_IP}
  3. Installed tmt on the host machine (available in Fedora 37 and newer and EPEL 8 and newer, see installation instructions)

Running the test

Run the whole test plan

SOURCE=8.8
TARGET=9.2
VM_IP=192.168.122.118

tmt run \
  --environment SOURCE=${SOURCE} \
  --environment TARGET=${TARGET} \
  --all \
  provision --how connect --guest ${VM_IP} \
  plans --name paths/prut

The environment variables SOURCE and TARGET refers to version of RHEL installed on the mchine before and after performing the upgrade and are used to perform sanity checks before and after the upgrade. Please note that not all combinations are valid, for supported upgrade paths see the official documentation for in-place upgrades.

Run only tests from the test plan with pre-upgrade tag

tmt run \
  --environment SOURCE=${SOURCE} --environment TARGET=${TARGET} \
  --all \
  provision --how connect --guest ${VM_IP} \
  plans --name paths/prut \
  tests --filter 'tag: pre-upgrade'

Run just one test of the test plan

tmt run \
  --environment SOURCE=${SOURCE} --environment TARGET=${TARGET} \
  --all \
  provision --how connect --guest ${VM_IP} \
  tests --name /tasks/00_initial_checks

Viewing results

To view results of the last test in web browser, use

tmt run --last report --how html --open

tmt primer

One repo can contain multiple test plans (usually in plans directory) which consists of multiple steps (the most prominent is execute step, which executes the tests). A test plan groups multiple tests (usually in tests directory).

To show details for all plans (only one plan is currently present in this repo)

tmt plans show

To show details for all tests (regardless if they belong to any test plan)

tmt tests show

List tests with specified tag

tmt tests ls --filter 'tag: pre-upgrade'