LukeMathWalker / LukeMathWalker/wiremock-rs

Fail tests on unexpected call

Open
#93 2 comments 2 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.