LukeMathWalker / LukeMathWalker/wiremock-rs
Fail tests on unexpected call
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 799
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
Right now, if a `MockServer` receives an unexpected call then this gets logged and an `HTTP 404` is returned to the client.
It would be useful if there was some way to have the server instead fail tests if it receives an unexpected request. That would not only be more obvious in outputs - especially if the client is expecting a 404 from the server and gets it for the wrong reason - but it also means that, if using WireMock to emulate a real remote service, unexpected API calls to it will be caught quickly.
Cheers
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how MockServer handles unexpected requests and review the existing test suite for request-matching failures. Define a configurable way for unexpected calls to fail tests while retaining the current HTTP 404 behavior where appropriate, then add coverage showing that an unexpected request is reported clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100