Skip to content

Add container tests that run the testing tool smoke checks against packaged containers - #6225

Merged
rbev merged 2 commits into
masterfrom
rbev/container-tests
Dec 3, 2026
Merged

rbev merged 2 commits into
masterfrom
rbev/container-tests

Conversation

@rbev

@rbev rbev commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds TestingTool.ContainerSmokeTests alongside the testing tool. It starts the packaged ServiceControl primary, audit, and monitoring images, hosts the testing tool in-process, and checks the APIs using the same transport as the containers.

  • Selects the image tag and registry through SC_CONTAINER_TESTS_TAG and SC_CONTAINER_TESTS_REGISTRY. The container tests are skipped when the tag is unset.
  • Accepts common settings from a .env or .json file, per-instance environment variables, and bind mounts. The transport service, database, and any required cloud account or bucket are supplied separately.
  • Rejects missing transport settings and the Learning transport. The testing tool adds PostgreSQL and Amazon SQS support and a TestingTool__RequireTransport option to prevent an unintended Learning transport fallback.
  • Runs custom-check execution through NServiceBus.CustomChecks and verifies a failure-to-pass transition through the ServiceControl API.
  • Adds a large-error-body check that fails a real message and verifies the retrieved text's length and SHA-256 hash.
  • Removes its ServiceControl containers and network after the run. Database data, broker resources, and stored bodies remain subject to their documented cleanup and retention behavior.

The project belongs to tools/testing-tool/TestingTool.slnx, not the main ServiceControl solution. The existing testing-tool CI workflow runs its settings tests without enabling the container tests.

tools/testing-tool/TestingTool.ContainerSmokeTests/README.md documents configuration, local PostgreSQL and filesystem setup, SQS and S3 setup, credential mounts, resource prefixes, and cleanup. The testing-tool README and docs/testing.md link to it.

Guidelines: none applies to the implementation and project relocation.

…ckaged containers

Adds ServiceControl.Container.Tests, which starts the primary, audit and
monitoring containers from an image tag with caller-supplied settings and
runs the testing tool smoke checks in-process against them. Adds
PostgreSQL and Amazon SQS transports and a RequireTransport option to the
testing tool.
Move the container tests from src/ServiceControl.Container.Tests to tools/testing-tool/TestingTool.ContainerSmokeTests so they build and run with the testing tool solution. Run the custom-check smoke check through the NServiceBus.CustomChecks plugin, add an error-large-body check, and document the container tests.
@rbev
rbev marked this pull request as ready for review December 2, 2026 08:17
@rbev
rbev merged commit 3ee7e72 into master Dec 3, 2026
71 checks passed
@rbev
rbev deleted the rbev/container-tests branch December 3, 2026 01:41
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.

2 participants