This repository was archived by the owner on May 12, 2026. It is now read-only.
chore(deps): update rust crate mockito to v1 - #59
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
2 times, most recently
from
March 31, 2023 09:25
0b8af98 to
d73fd5a
Compare
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
from
June 17, 2023 13:22
d73fd5a to
7982ac9
Compare
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
2 times, most recently
from
September 15, 2023 14:18
08ed974 to
46024cd
Compare
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
2 times, most recently
from
February 26, 2024 15:40
025730f to
8b90522
Compare
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
from
February 28, 2024 15:53
8b90522 to
71bd99e
Compare
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
from
May 5, 2024 10:52
71bd99e to
e113574
Compare
renovate
Bot
force-pushed
the
renovate/mockito-1.x
branch
from
September 11, 2024 07:29
e113574 to
ae9a24e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.30.0→1.0.0Release Notes
lipanski/mockito (mockito)
v1.7.2Compare Source
v1.7.1Compare Source
v1.7.0Compare Source
parking_lotoptionalrandcrate to v0.9coloredcrate v3Thanks to @tottoto @nerodono
v1.6.1Compare Source
Mock::with_header_from_requestallowing you to set the header dynamically by using a closure which exposes theRequestobjectThanks to @alex-kattathra-johnson
v1.6.0Compare Source
Mock::match_requestwhich exposes theRequestobject via a closure and can be used to build custom matchersv1.5.0Compare Source
Thanks to @tottoto
v1.4.0Compare Source
coloredcratev1.3.1Compare Source
Semaphore::const_newwasn't available on Tokio < 1.30 because of the missing Tokioparking_lotfeature flagfuturescrate (aside fromfutures-core)Thanks to @tottoto
v1.3.0Compare Source
Server::new_with_opts,Server::new_with_opts_asyncand theServerOptsstruct to allow configuring the server host, port and enabling auto-asserts (see next item)assert_on_dropserver option that allows you to automatically callassert()whenever your mocks go out of scope (defaults to false)Server::socket_address()to return the raw serverSocketAddrhyper::header::HeaderValueas amatch_header()valueThanks to @andrewtoth @alexander-jackson
v1.2.0Compare Source
mac_ostargets to prevent hitting the file descriptor limitThanks to @kornelski
v1.1.1Compare Source
with_chunked_bodysupports streaming responses (as opposed to writing the entire buffer in one go)Thanks to @kornelski
v1.1.0Compare Source
v1.0.2Compare Source
v1.0.1Compare Source
futures::future::join_allwould block the server pool.Server::reset_asynchas been deprecated in favour ofServer::resetsince the former doesn't have an async implementation any more.v1.0.0Compare Source
🎈 7 years and 63 releases later, it's finally time for the 1.0 🎈
Changes
Mock::with_body_from_fnwas renamed toMock::with_chunked_body- the former is still supported with a deprecation warningMock::removeandMock::remove_asyncmethods to remove mocks on demandMajor changes since 0.31
For a list of all the changes please check the release log.
Migrating to the new API
Legacy API:
New API:
Migrating to the async API
In order to write async tests, you'll need to use the
_asyncmethods:Server::new_asyncMock::create_asyncMock::assert_asyncMock::matched_asyncMock::remove_asyncServer::reset_async...otherwise your tests will not compile and you'll see this error:
Example:
v0.32.5Compare Source
Arc(more reliable in this case)v0.32.4Compare Source
Mock::with_body_from_requestwhich allows setting the response body dynamically, based on theRequestobjectMutexwith anRwLockv0.32.3Compare Source
Server::newandServer::new_asyncnow return aServerGuardobject which dereferences toServer- this is only relevant if you need to assign a type to your serverv0.32.2Compare Source
_asyncmethodsv0.32.1Compare Source
v0.32.0Compare Source
This is a major re-write, introducing a bunch of long awaited features:
[Breaking] The minimum supported Rust version was bumped to 1.65.0
Tests can now run in parallel as long as you use the new
mockito::ServerAPI:You can run multiple servers/hosts at the same time:
Support for HTTP2
An async interface for all actions (though the sync interface is also available):
The backend has been rewritten to use Hyper
This version will be backwards compatible with the previous version, but deprecation warnings have been introduced and you are encouraged to migrate, since the old API still requires running tests sequentially. Migrating to the new API is quite straighforward:
Migrating to the new API
Legacy API:
New API:
Migrating to the async API
In order to write async tests, you'll need to use the
_asyncmethods:Server::new_asyncMock::create_asyncMock::assert_asyncMock::matched_asyncServer::reset_async...otherwise your tests will not compile and you'll see this error:
Cannot start a runtime from within a runtime.When using tokio, prefer the single-threaded runtime over the multi-threaded one.
Example:
v0.31.1Compare Source
Thanks to @chantra
v0.31.0Compare Source
Thanks to @ameliabradley
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.