Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testcontainers Support in WireMock Python #72

Merged
merged 25 commits into from
Jul 11, 2023

Conversation

mikeywaites
Copy link
Collaborator

@mikeywaites mikeywaites commented Jul 5, 2023

References

Adds support for testcontainers-python. Now you can programmatically spin up a WireMockContainer directly from your test suite. WireMockContainer ships with support for auto generating mapping and stub files, easily manage the container life cycle with the wiremock_container context manager, integrates easily into your existing test suite, supports docker in docker mode for common CI use cases and much more.

Submitter checklist

  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@mikeywaites mikeywaites force-pushed the feature/test-containers branch from 1d6297b to 94f0d7d Compare July 5, 2023 06:54
@mikeywaites mikeywaites changed the title Feature/test containers Testcontainers Support in WireMock Python Jul 5, 2023
@mikeywaites mikeywaites added this to the WireMock Python 3.0 milestone Jul 5, 2023
@mikeywaites mikeywaites force-pushed the feature/test-containers branch from 94f0d7d to 4634c10 Compare July 5, 2023 06:58
checking the code in at this point. extensions are causing
the container to crash.
remove the docker in docker config variable as this will be a user
managed configurations.

increased test coverage after some additional api tweaks were made to the test container
Added handling to the server_running method to support cases where
the docker container is running testcontainers inside a container.
When this flow is used users will need to set an WIREMOCK_DIND
env var so that the host used can revert to the host.docker.internal
url.

There are also a number of fixes to the code to get the test suites
passing.  Test run time was all reduced significantly by mocking
more method to avoid starting containers on a test by test bases.
@mikeywaites mikeywaites force-pushed the feature/test-containers branch from f01ff72 to 6b4b1fc Compare July 8, 2023 10:30
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming needs cleanup across the board in the docs. For example, it is a part of [not so documented] certification criteria. Have not got to testing the guidelines and full review yet

mikeywaites and others added 8 commits July 11, 2023 06:31
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
mikeywaites and others added 3 commits July 11, 2023 06:33
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
@mikeywaites mikeywaites marked this pull request as ready for review July 11, 2023 05:41
@mikeywaites mikeywaites merged commit 6d16853 into master Jul 11, 2023
@mikeywaites mikeywaites deleted the feature/test-containers branch July 11, 2023 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants