Migrate tests from STI to TMT (#2383039)
This commit is contained in:
parent
838398badd
commit
dad4010e50
5 changed files with 12 additions and 29 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
10
plans/tests.fmf
Normal file
10
plans/tests.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- python3-pidfile
|
||||
|
||||
discover:
|
||||
how: fmf
|
||||
|
||||
execute:
|
||||
how: tmt
|
||||
1
tests/test.fmf
Normal file
1
tests/test.fmf
Normal file
|
|
@ -0,0 +1 @@
|
|||
test: python3 test_pidfile.py /tmp/test.log
|
||||
|
|
@ -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 }}"
|
||||
|
|
@ -1 +0,0 @@
|
|||
- import_playbook: test_playbook.yml
|
||||
Loading…
Add table
Add a link
Reference in a new issue