Add tmt smoke test + plan

Cherry-picked from c9s.
Commit hash: 53acc26463
This commit is contained in:
Lukas Zachar 2021-07-19 09:50:49 +02:00 committed by Karolina Surma
parent 2f9a407230
commit ad8569f261
4 changed files with 21 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

4
plans.fmf Normal file
View File

@ -0,0 +1,4 @@
discover:
how: fmf
execute:
how: tmt

7
tests/smoke.fmf Normal file
View File

@ -0,0 +1,7 @@
description: |
Runs very simple jinja2 template which should always work
test: python3 smoke.py
framework: shell
require:
- python3
- python3-jinja2

9
tests/smoke.py Normal file
View File

@ -0,0 +1,9 @@
import jinja2
TEMPLATE = "Text {{ variable }}"
environment = jinja2.Environment()
template = environment.from_string(TEMPLATE)
output = template.render(variable="demo")
assert output == "Text demo", f"got: {output}"