summaryrefslogtreecommitdiffstats
path: root/tests/pytest.ini
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-01 17:15:29 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-09 03:32:52 +0000
commit1165c61f5ab8ada644c7def03e991890c4d380ca (patch)
tree1cd1c1d58039afad5a1d24b5c10d8030237e2d7c /tests/pytest.ini
parentc32e1081c81ba27f0d5a21a1885601f04d329d21 (diff)
downloadmeta-virtualization-1165c61f5ab8ada644c7def03e991890c4d380ca.tar.gz
tests: add pytest framework for vdkr and vpdmn
Add pytest-based test suite for testing vdkr and vpdmn CLI tools. Tests use a separate state directory (~/.vdkr-test/) to avoid interfering with production images. Test files: - conftest.py: Pytest fixtures for VdkrRunner and VpdmnRunner - test_vdkr.py: Docker CLI tests (images, vimport, vrun, volumes, etc.) - test_vpdmn.py: Podman CLI tests (mirrors vdkr test coverage) - memres-test.sh: Helper script for running tests with memres - pytest.ini: Pytest configuration and markers Test categories: - Basic operations: images, info, version - Import/export: vimport, load, save - Container execution: vrun, run, exec - Storage management: system df, vstorage - Memory resident mode: memres/vmemres start/stop/status Running tests: pytest tests/test_vdkr.py -v --vdkr-dir /tmp/vcontainer-standalone pytest tests/test_vpdmn.py -v --vdkr-dir /tmp/vcontainer-standalone Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'tests/pytest.ini')
-rw-r--r--tests/pytest.ini29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/pytest.ini b/tests/pytest.ini
new file mode 100644
index 00000000..b0a51f7e
--- /dev/null
+++ b/tests/pytest.ini
@@ -0,0 +1,29 @@
1[pytest]
2testpaths = .
3python_files = test_*.py
4python_classes = Test*
5python_functions = test_*
6
7# Markers
8markers =
9 slow: marks tests as slow (deselect with '-m "not slow"')
10 memres: marks tests that require memory resident mode
11 network: marks tests that require network access
12 boot: marks tests that boot a full QEMU image (requires pexpect)
13
14# Default options - include junit xml for CI and detailed output
15addopts = -v --tb=short --junitxml=/tmp/pytest-results.xml
16
17# Log file for test output (always written, survives test runs)
18log_file = /tmp/pytest-vcontainer.log
19log_file_level = DEBUG
20log_file_format = %(asctime)s %(levelname)s %(message)s
21log_file_date_format = %Y-%m-%d %H:%M:%S
22
23# Also show logs on console during test run
24log_cli = false
25log_cli_level = INFO
26
27# Ignore warnings from subprocess
28filterwarnings =
29 ignore::DeprecationWarning