tests: basic configuration

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
Iker Pedrosa 2024-11-08 13:46:51 +01:00 committed by Serge Hallyn
parent 128650dfd4
commit e4610acf53
8 changed files with 65 additions and 0 deletions

5
.gitignore vendored
View File

@ -54,3 +54,8 @@ test-driver
/shadow-*.tar.*
/lib/getdate.c
/libsubid/subid.h
.venv
__pycache__/
tests/system/artifacts/
tests/system/pytest.log

18
tests/system/conftest.py Normal file
View File

@ -0,0 +1,18 @@
# Configuration file for multihost tests.
from __future__ import annotations
from pytest_mh import MultihostPlugin
from framework.config import ShadowMultihostConfig
# Load additional plugins
pytest_plugins = (
"pytest_mh",
"pytest_ticket",
)
def pytest_plugin_registered(plugin) -> None:
if isinstance(plugin, MultihostPlugin):
plugin.config_class = ShadowMultihostConfig

12
tests/system/mhc.yaml Normal file
View File

@ -0,0 +1,12 @@
provisioned_topologies:
- shadow
domains:
- id: shadow
hosts:
- hostname: shadow.test
role: shadow
conn:
type: podman
container: builder
artifacts:
- /var/log/*

0
tests/system/py.typed Normal file
View File

View File

@ -0,0 +1,11 @@
[[tool.mypy.overrides]]
module = "jc.*"
ignore_missing_imports = true
[tool.isort]
line_length = 119
profile = "black"
add_imports = "from __future__ import annotations"
[tool.black]
line-length = 119

5
tests/system/pytest.ini Normal file
View File

@ -0,0 +1,5 @@
[pytest]
pythonpath = . framework
addopts = --strict-markers
testpaths = tests
ticket_tools = bz,gh,jira

View File

@ -0,0 +1,5 @@
flaky
jc
pytest
git+https://github.com/next-actions/pytest-mh@1.0.21
git+https://github.com/next-actions/pytest-ticket

9
tests/system/setup.cfg Normal file
View File

@ -0,0 +1,9 @@
[flake8]
max-line-length = 119
ignore = E203,W503
exclude = .venv
[pycodestyle]
max-line-length = 119
ignore = E203,W503
exclude = .venv