Skip to content

Commit 20631e4

Browse files
committed
LCORE-1873: Add container lifecycle integration tests
Add automated test suite for Llama Stack container build, startup, health monitoring, configuration, and teardown operations. Tests verify Makefile container orchestration targets work correctly across podman and docker. Key features: - Class-scoped managed container fixture - Image ID-based idempotency verification (deterministic, container runtime cache-agnostic) - Host-side HTTP health checks - Parametrized mount point verification - Destructive test ordering to prevent dev environment impact - Proper cleanup of stale artifacts to prevent false positives Test coverage: - Build: Image creation and idempotency via SHA256 comparison - Deployment: Container startup, health checks, port mapping, volume mounts - Configuration: Custom port handling - Teardown: Graceful stop, log persistence, full cleanup - Error handling: Double-start replacement behavior Signed-off-by: Anik Bhattacharjee <anbhatta@redhat.com>
1 parent 6116ef7 commit 20631e4

4 files changed

Lines changed: 649 additions & 0 deletions

File tree

.github/workflows/integration_tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ jobs:
2828
- name: Install pdm # Required for dynamic version test
2929
run: uv pip install pdm
3030
- name: Run integration tests
31+
env:
32+
OPENAI_API_KEY: "sk-dummy-key-for-testing"
3133
run: uv run pytest tests/integration --cov=src --cov=runner --cov-report term-missing

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ dev = [
125125
"pytest-cov>=5.0.0",
126126
"pytest-mock>=3.14.0",
127127
"pytest-asyncio>=1.0.0",
128+
"pytest-order>=1.2.0",
128129
"pyright>=1.1.401",
129130
"pylint>=3.3.7",
130131
"pydocstyle>=6.3.0",
@@ -220,6 +221,10 @@ pythonpath = [
220221
addopts = [
221222
"--import-mode=importlib",
222223
]
224+
markers = [
225+
"destructive: marks tests as destructive (deselect with '-m \"not destructive\"')",
226+
"order: controls test execution order (requires pytest-order plugin)",
227+
]
223228

224229
[tool.pylint.main]
225230
source-roots = "src"

0 commit comments

Comments
 (0)