Context
#2368 laid the foundation for integration tests: the python-osism-integration-tests Zuul job (playbooks/test-integration.yml) starts a single redis:7-alpine container, installs the package with pipenv, and runs pytest tests/integration with REDIS_HOST=localhost and OSISM_REQUIRE_REDIS=1. The shared infrastructure — skip-when-Redis-unreachable logic plus the celery_app / celery_worker session fixtures — lives in tests/integration/conftest.py.
Three test modules exist so far:
test_celery.py — noop round-trip + worker visibility
test_locking.py — Redlock + task-lock round-trip
test_redis_streams.py — task-output push/finish/fetch
This meta issue tracks the next round of integration tests. The guiding principle: first exhaust everything that works with the existing single-Redis infrastructure (Tier 1), then add the few tests that need only one extra test dependency (Tier 2 — httpx for the FastAPI TestClient). Tests that require additional services (RabbitMQ, NetBox, OpenStack) are explicitly out of scope here and will be tracked separately.
All new tests live under tests/integration/, carry pytestmark = pytest.mark.integration, stay green locally (skipped without Redis), and run for real in CI.
Tier 1 — no infrastructure change (Redis only)
Tier 2 — one extra test dependency (httpx for FastAPI TestClient)
Shared prerequisite: add httpx to [dev-packages] in Pipfile so fastapi.testclient.TestClient is importable. fastapi itself is already a runtime dependency.
Context
#2368 laid the foundation for integration tests: the
python-osism-integration-testsZuul job (playbooks/test-integration.yml) starts a singleredis:7-alpinecontainer, installs the package with pipenv, and runspytest tests/integrationwithREDIS_HOST=localhostandOSISM_REQUIRE_REDIS=1. The shared infrastructure — skip-when-Redis-unreachable logic plus thecelery_app/celery_workersession fixtures — lives intests/integration/conftest.py.Three test modules exist so far:
test_celery.py— noop round-trip + worker visibilitytest_locking.py— Redlock + task-lock round-triptest_redis_streams.py— task-output push/finish/fetchThis meta issue tracks the next round of integration tests. The guiding principle: first exhaust everything that works with the existing single-Redis infrastructure (Tier 1), then add the few tests that need only one extra test dependency (Tier 2 —
httpxfor the FastAPITestClient). Tests that require additional services (RabbitMQ, NetBox, OpenStack) are explicitly out of scope here and will be tracked separately.All new tests live under
tests/integration/, carrypytestmark = pytest.mark.integration, stay green locally (skipped without Redis), and run for real in CI.Tier 1 — no infrastructure change (Redis only)
Tier 2 — one extra test dependency (
httpxfor FastAPI TestClient)Shared prerequisite: add
httpxto[dev-packages]inPipfilesofastapi.testclient.TestClientis importable.fastapiitself is already a runtime dependency./v1/events/openstackvia TestClient