#66 Add a WireMock container to mock the APIs called by the processes - #67
Merged
Merged
Conversation
…ed by the processes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #66.
Adds a WireMock container to the Docker stack, and demo processes showing how to mock the APIs called by the processes (no network access needed, known responses, reproducible error cases).
.docker/compose.yaml:wiremockservice (wiremock/wiremock:3.13.2, latest stable), stubs loaded from.docker/wiremock/mappings/__files, response templating enabled for every stub, admin UI / API on the host portWIREMOCK_PORT(default8089).docker/wiremock/: 9 stubs (a mocked "library" API) and a body file.env:WIREMOCK_URL(http://wiremock:8080)config/services.yaml:wiremockREST client (mocked API) andwiremock_admin(admin API)demo.wiremock.*processes, one per use case:demo.wiremock.get_jsondemo.wiremock.path_templatingdemo.wiremock.post_json201output /422sent toerror_outputsdemo.wiremock.error_codes404/500witherror_strategy: skipanderror_outputsdemo.wiremock.authentication401)demo.wiremock.faultCONNECTION_RESET_BY_PEER): transport errordemo.wiremock.verify_requests{"count": 2})docs/wiremock.md(new, linked fromdocs/index.md): setup, use cases, how to add a stub;.claude/CLAUDE.md: WireMock mentioned for the REST mocksAll the processes were run in the container with the current bundles: they work with cleverage/rest-process-bundle
main. With cleverage/rest-process-bundle#40,demo.wiremock.faultalso logs the transport error (REST request failed, cleverage/rest-process-bundle#36).To try it:
docker compose -f .docker/compose.yaml up -d wiremock(ormake upd), thenmake bashandbin/console cleverage:process:execute demo.wiremock.get_json.Requirements
Breaking changes
None (new container, clients and demo processes). The host port
8089must be free, or setWIREMOCK_PORTin.docker/.env.🤖 Generated with Claude Code