update tests to tmt framework

sync with el8 work done earlier

Related: RHEL-16726

Signed-off-by: Chris Leech <cleech@redhat.com>
This commit is contained in:
Chris Leech 2023-11-15 16:46:00 -08:00
parent dfe63940bf
commit 6d9d84f401
6 changed files with 41 additions and 39 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
plans/sanity.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Run relevant tests from the tests directory
discover:
how: fmf
execute:
how: tmt

21
plans/sts.fmf Normal file
View File

@ -0,0 +1,21 @@
summary: Tier 0 iSCSI initiator tests
discover:
how: fmf
url: https://gitlab.com/rh-kernel-stqe/sts
ref: fedora
filter:
- tier:0
- tag:iscsi
- tag:local
context:
component: iscsi-initiator-utils
execute:
how: tmt
environment:
STS_VENV_PATH: /opt/sts-venv
prepare:
- name: install-sts-libs
how: shell
script: >
curl --retry 3 --retry-delay 5 --connect-timeout 10 --max-time 30 -s
https://gitlab.com/rh-kernel-stqe/sts/-/raw/fedora/scripts/install-sts-libs.sh | bash

View File

@ -0,0 +1,13 @@
summary: Creates iSCSI target/initiator, and logs it in locally
description: ''
contact: Andy Walsh <awalsh@redhat.com>
component:
- iscsi-initiator-utils
test: ./runtest.sh
framework: beakerlib
recommend:
- test_beakertask
duration: 5m
extra-summary: /beaker_nvr_test
extra-task: /beaker_nvr_test
tier: 0

View File

@ -26,7 +26,6 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
# Set up a target IQN to use through the test.
@ -68,7 +67,7 @@ rlPhaseStartSetup
if [ -f /etc/iscsi/initiatorname.iscsi ]; then
. /etc/iscsi/initiatorname.iscsi
else
echo "InitiatorName=`/usr/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi
echo InitiatorName=`iscsi-iname` > /etc/iscsi/initiatorname.iscsi
. /etc/iscsi/initiatorname.iscsi
fi

View File

@ -1,37 +0,0 @@
---
# Tests suitable to run in classic environment
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- iscsi-target-initiator-restraint
required_packages:
- targetcli
- hosts: localhost
roles:
- role: standard-test-basic
# python-stqe cannot be installed on 'atomic', no need to run on 'container'
tags:
- classic
repositories:
- repo: "https://gitlab.com/rh-kernel-stqe/python-stqe.git"
dest: "python-stqe"
version: 535ecebf5611e158079d806b6232e3d2c68f0d93
tests:
# Install python-stqe first
# make sure we use same version of libsan
- install_stqe:
dir: python-stqe
run: pip3 install libsan==0.3.0 && python3 setup.py install --prefix=
- iscsi-initiator-utils:
dir: ./
run: stqe-test run -t iscsi/iscsi_params.py
required_packages:
# required for python-stqe
- python3-pyyaml
- python3-netifaces
- python3-augeas
- python3-pip