wiremock-rs
wiremock-rs copied to clipboard
HTTP mocking to test Rust applications.
Would this addition be welcome? I could look into writing a PR for this.
Hello, Can you evaluate the following proposal? If you agree, I can provide a PR. ## Proposal This issue aims to propose a named mock. ## use case Currently, mock...
I have bumped into users trying the following: ```rust Mock::given(path("https://domain.com/abcd")); ``` with an expectation that it will match incoming requests for `/abcd`. In reality, they should write: ```rust Mock::given(path("/abcd")); ```...
It would be very helpful if you would keep maintaining a change log. The absence of a changelog makes it more difficult to assess the impact of a version update...
It would be nice to be able to fail a test with a clear diff between the expected and actual request body sent to a mock. Use case: I'm mocking...
The call to `insert_header` does nothing here: ```rust let followed_page = ResponseTemplate::new(200) .set_body_string(followed_page_html) .insert_header("content-type", "text/html"); ``` and instead requires doing this: ```rust let followed_page = ResponseTemplate::new(200) .set_body_raw(followed_page_html.as_bytes(), "text/html; charset=utf-8"); ```...
Hello, I think having clearer failed verification messages would make debugging multiple chained .and(matcher) calls easier. For example: Mock::given(header_exists("X-Postmark-Server-Token")) .and(header("Content-Type", "application/json")) .and(path("/email")) .and(method("POST")) .and(SendEmailBodyMatcher) Fails with: thread 'email_client::tests::send_email_sends_the_expected_request' panicked at...
It should be possible to spin up an HTTPS mock server. This probably requires implementing some routine to generate a set of certificates on the fly which the HTTP client...
Hey, thanks for the crate. I'm building a [link checker](https://github.com/hello-rust/lychee) and I need a way to simulate a connect delay. Here's a little snippet to show what I tried: ```rust...
Hi here, Good morning. I am using 0.6.0 version. I setup a mock for an http call with an header that looks like `.and(header("x-ms-date", "Sun, 01 Jan 2023 00:00:00 GMT"))`...