Update tests from STS to TMT

Resolves: RHEL-111711

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
This commit is contained in:
Bryn M. Reeves 2025-11-04 15:10:09 +00:00
parent 0bd40675d0
commit 97c0944777
4 changed files with 34 additions and 51 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

24
plans/main.fmf Normal file
View File

@ -0,0 +1,24 @@
discover:
how: fmf
dist-git-source: true
execute:
how: tmt
prepare:
- name: Install packages
how: install
package:
- stratisd
- stratis-cli
- lvm2
- python3-pytest
- name: Enable Stratisd
how: shell
script: |
systemctl enable --now stratisd
- name: Enable CRB
how: shell
script: |
dnf install -y "dnf-command(config-manager)" ;
dnf config-manager --set-enabled crb || true

View File

@ -1,51 +0,0 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
tests:
- testsuite_pre:
dir: .
# boom test suite requires LV to exist on the system. We create one in case there is not one...
run: |
set -xv;
rm -rf testsuite &>/dev/null;
if [[ ! -b /dev/boomvg/root ]]; then dd if=/dev/zero of=/dev/shm/boompv bs=1M count=128 && PV=$(losetup --show -f /dev/shm/boompv) && vgcreate boomvg $PV && lvcreate -n root -L32M boomvg; fi
- testsuite:
# to run the testsuite against installed python modules, we should run
# outside of source directory. Let's copy tests into new directory...
dir: .
run: |
set -xv;
mkdir testsuite && cd testsuite && cp -R ../source/tests . && python3 -m unittest -v tests/[a-z]*.py
- cli:
dir: .
run: |
(
set -xve;
#boom profile list;
boom profile create --name test --short-name test --os-version rhel8 --os-version-id rhel8 --uname-pattern el8;
boom profile list;
boom entry list;
PROFILE=$(boom profile list --name test --no-headings -o osid);
boom entry create --root-lv boomvg/root --title test --profile $PROFILE;
boom entry list;
boom entry delete --title test;
boom profile delete --name test;
)
- testsuite_post:
dir: .
run: |
set -xv;
vgremove -ff boomvg; losetup -D; rm -f /dev/shm/boompv
required_packages:
- boom-boot
- lvm2

9
tests/upstream/main.fmf Normal file
View File

@ -0,0 +1,9 @@
summary: Run boom upstream test suite
test: |
cd $TMT_SOURCE_DIR/boom-boot-*[0-9]/
pytest -v --log-level=debug
require:
- boom-boot
- python3-pytest
- python3-devel
duration: 5m