Skip to content

feat(rabbitmq): add clientless RabbitMQ service - #158

Open
cofin wants to merge 1 commit into
feat/pubsub-servicefrom
feat/rabbitmq-service
Open

cofin wants to merge 1 commit into
feat/pubsub-servicefrom
feat/rabbitmq-service

Conversation

@cofin

@cofin cofin commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a clientless RabbitMQ 4.3 AMQP broker service (rabbitmq_service) that validates readiness and provisions virtual hosts using the container-bundled rabbitmq-diagnostics, rabbitmqctl, and rabbitmqadmin CLIs without requiring a Python AMQP client dependency.

Key Changes

RabbitMQ Broker Service (pytest_databases.docker.rabbitmq)

  • Container-Native CLI Readiness: Checks broker health and AMQP listener readiness via rabbitmq-diagnostics inside the running container and keeps the management port internal.
  • Service Metadata & AMQP URL: Exposes RabbitMQService with custom credentials, virtual host, and URL-encoded amqp_url formatting.
  • Worker Isolation: Supports shared-broker per-worker virtual host provisioning (database isolation via rabbitmqctl add_vhost / set_permissions) and dedicated per-worker broker containers (server isolation) via xdist_rabbitmq_isolation_level.

Testing, Documentation & CI

  • Unit & Integration Coverage: Adds unit and integration coverage for clientless module import, RabbitMQService URL encoding, queue/exchange publish and consume via rabbitmqadmin, and pytest-xdist virtual host isolation.
  • Documentation & Selective CI: Adds docs/supported-databases/rabbitmq.rst and registers rabbitmq in .github/ci/provider-groups.json.

Closes #150

@codecov-commenter

codecov-commenter commented Jul 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.89888% with 17 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/pubsub-service@ade8d65). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pytest_databases/docker/rabbitmq.py 80.89% 12 Missing and 5 partials ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             feat/pubsub-service    #158   +/-   ##
=====================================================
  Coverage                       ?   8.16%           
=====================================================
  Files                          ?      28           
  Lines                          ?    3060           
  Branches                       ?     254           
=====================================================
  Hits                           ?     250           
  Misses                         ?    2741           
  Partials                       ?      69           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin
cofin force-pushed the feat/rabbitmq-service branch 2 times, most recently from 967f828 to 633edd7 Compare July 22, 2026 17:05
@cofin cofin changed the title feat: add clientless RabbitMQ service feat(rabbitmq): add clientless RabbitMQ service Oct 22, 2026
@cofin
cofin force-pushed the feat/rabbitmq-service branch from 633edd7 to 28c0289 Compare October 22, 2026 02:29
@cofin
cofin changed the base branch from feat/podman-support to feat/pubsub-service October 22, 2026 03:58
@cofin
cofin force-pushed the feat/rabbitmq-service branch from 28c0289 to 15f16e5 Compare October 22, 2026 03:58
@cofin
cofin added this pull request to stack #173 October 22, 2026 05:10
@cofin
cofin force-pushed the feat/rabbitmq-service branch from 15f16e5 to dbc459a Compare October 22, 2026 17:19
@cofin
cofin force-pushed the feat/rabbitmq-service branch from dbc459a to 3d44fe1 Compare October 22, 2026 20:04
@cofin
cofin force-pushed the feat/rabbitmq-service branch from 3d44fe1 to c3985f6 Compare October 22, 2026 23:05
@cofin
cofin marked this pull request as ready for review October 22, 2026 23:29
@cofin
cofin force-pushed the feat/rabbitmq-service branch from c3985f6 to e1102e7 Compare October 23, 2026 20:15
@cofin
cofin force-pushed the feat/rabbitmq-service branch from e1102e7 to 1b775e9 Compare October 29, 2026 14:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add message broker / emulator fixtures: Kafka (Redpanda), LocalStack, Google Pub/Sub emulator, RabbitMQ

2 participants