diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/tests.fmf b/plans/tests.fmf new file mode 100644 index 0000000..2cf54e9 --- /dev/null +++ b/plans/tests.fmf @@ -0,0 +1,10 @@ +prepare: + how: install + package: + - python3-pidfile + +discover: + how: fmf + +execute: + how: tmt diff --git a/tests/test.fmf b/tests/test.fmf new file mode 100644 index 0000000..4979eeb --- /dev/null +++ b/tests/test.fmf @@ -0,0 +1 @@ +test: python3 test_pidfile.py /tmp/test.log diff --git a/tests/test_playbook.yml b/tests/test_playbook.yml deleted file mode 100644 index 32429af..0000000 --- a/tests/test_playbook.yml +++ /dev/null @@ -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 }}" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 8da8402..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1 +0,0 @@ -- import_playbook: test_playbook.yml