wiremock-testcontainers-java icon indicating copy to clipboard operation
wiremock-testcontainers-java copied to clipboard

Verify mappings status in WireMock test container on startup and fail by default when there're no mappings

Open oleg-nenashev opened this issue 2 years ago • 1 comments

This is an alternative to #69 for #28 that uses the Wait Strategy to verify the response and say the container is not ready if there are no mappings. Unfortunately it is not going help with #28, bacause there is no way to abort the wait loop from the predicate.

Submitter checklist

  • [ ] Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • [ ] 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

oleg-nenashev avatar Aug 21 '23 09:08 oleg-nenashev

I like the idea to have validation of empty mapping, but i would allow empty mapping by default and failed container only if developer explicitly asked about that (executed withFailureOnEmptyMappings())

bitxon avatar Aug 26 '23 09:08 bitxon