Skip to content

Commit

Permalink
Move unit tests and enable them for pull requests
Browse files Browse the repository at this point in the history
Some unit tests need a special setup but most of them should be
working without authentication. Let's try to enable them in tmt.
  • Loading branch information
psss committed Jan 27, 2023
1 parent 0b595a4 commit 88188d9
Show file tree
Hide file tree
Showing 22 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plans/smoke.fmf → plans/basic.fmf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
summary:
Basic smoke test
Check basic functionality
discover:
how: fmf
provision:
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions tests/unit/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
summary: Python unit tests
description:
Run all available python unit tests using pytest.
test: python3 -m pytest -vvv -ra --showlocals
duration: 15m
framework: shell
require:
- python3-pytest
environment:
LANG: en_US.UTF-8
tier: 0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_cli.py → tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Prepare path and config examples
PATH = os.path.dirname(os.path.realpath(__file__))
MINIMAL = did.base.Config.example()
EXAMPLE = "".join(open(PATH + "/../examples/config").readlines())
EXAMPLE = "".join(open(PATH + "/../../examples/config").readlines())
# Substitute example git paths for real life directories
EXAMPLE = re.sub(r"\S+/git/[a-z]+", PATH, EXAMPLE)

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 88188d9

Please sign in to comment.