CICD-340 · RabbitMQ integration testing
Encyclopedia · Distributed systems and reliability testing · All snippets
Previous · CICD-339 · Next · CICD-341
1. Where it fits
- Placement CI run step.
- Prerequisites disposable integration environment, synthetic traffic and controlled test faults.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
docker compose up -d --wait rabbitmq
docker compose exec -T rabbitmq rabbitmq-diagnostics -q ping
pytest -q tests/test_rabbitmq.py3. How it works
Compose starts the selected project services. With --wait, completion depends on running or healthy state under its project configuration. The command executes inside an already-running service container using that service's network and runtime state.
4. Verify the result
A healthy broker establishes reachability. App-level tests must assert acknowledgements and retry semantics.
Validation syntax-validated (Bash parse). Status definitions.