Skip to content

Commit

Permalink
tests: basic configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Iker Pedrosa <[email protected]>
  • Loading branch information
ikerexxe authored and hallyn committed Jan 11, 2025
1 parent 128650d commit e4610ac
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ test-driver
/shadow-*.tar.*
/lib/getdate.c
/libsubid/subid.h

.venv
__pycache__/
tests/system/artifacts/
tests/system/pytest.log
18 changes: 18 additions & 0 deletions tests/system/conftest.py
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions tests/system/mhc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
provisioned_topologies:
- shadow
domains:
- id: shadow
hosts:
- hostname: shadow.test
role: shadow
conn:
type: podman
container: builder
artifacts:
- /var/log/*
Empty file added tests/system/py.typed
Empty file.
11 changes: 11 additions & 0 deletions tests/system/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions tests/system/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[pytest]
pythonpath = . framework
addopts = --strict-markers
testpaths = tests
ticket_tools = bz,gh,jira
5 changes: 5 additions & 0 deletions tests/system/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
flaky
jc
pytest
git+https://github.com/next-actions/[email protected]
git+https://github.com/next-actions/pytest-ticket
9 changes: 9 additions & 0 deletions tests/system/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[flake8]
max-line-length = 119
ignore = E203,W503
exclude = .venv

[pycodestyle]
max-line-length = 119
ignore = E203,W503
exclude = .venv

0 comments on commit e4610ac

Please sign in to comment.