Add tmt smoke test + plan
Cherry-picked from c9s. Commit hash: 53acc26463e0248c91146bd2f6065d53fb845580
This commit is contained in:
parent
5d9a9d69be
commit
46fea4b890
4 changed files with 21 additions and 0 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
4
plans.fmf
Normal file
4
plans.fmf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
7
tests/smoke.fmf
Normal file
7
tests/smoke.fmf
Normal 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
9
tests/smoke.py
Normal 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}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue