Migrate tests from STI to TMT (#2383039)

This commit is contained in:
Vojtech Trefny 2025-07-24 14:34:37 +02:00
commit dad4010e50
5 changed files with 12 additions and 29 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

10
plans/tests.fmf Normal file
View file

@ -0,0 +1,10 @@
prepare:
how: install
package:
- python3-pidfile
discover:
how: fmf
execute:
how: tmt

1
tests/test.fmf Normal file
View file

@ -0,0 +1 @@
test: python3 test_pidfile.py /tmp/test.log

View file

@ -1,28 +0,0 @@
- hosts: localhost
vars:
config:
packagename: python-pidfile
testfilename: test_pidfile.py
logfilepath: /tmp/test.log
artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
remote_user: root
tasks:
- name: Install required package
dnf:
name:
- "{{ config.packagename }}"
- python3
- name: Test Execution
block:
- name: Execute the tests
command: python3 {{ config.testfilename }} {{ logfilepath }}
always:
- name: Pull out the artifacts
fetch:
dest: "{{ config.artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- "{{ config.logfilepath }}"

View file

@ -1 +0,0 @@
- import_playbook: test_playbook.yml