chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

59
vendor/wiremock/tests/tokio.rs vendored Normal file
View File

@@ -0,0 +1,59 @@
use reqwest::Client;
use wiremock::matchers::{method, path};
use wiremock::{Mock, MockServer, ResponseTemplate};
// regression tests for https://github.com/LukeMathWalker/wiremock-rs/issues/7
// running both tests will _sometimes_ trigger a hang if the runtimes aren't separated correctly
#[tokio::test]
async fn hello_reqwest() {
let mock_server = MockServer::start().await;
Mock::given(method("GET"))
.and(path("/"))
.respond_with(ResponseTemplate::new(200))
.mount(&mock_server)
.await;
let resp = Client::new().get(&mock_server.uri()).send().await.unwrap();
assert_eq!(resp.status(), 200);
}
#[actix_rt::test]
async fn hello_reqwest_actix() {
let mock_server = MockServer::start().await;
Mock::given(method("GET"))
.and(path("/"))
.respond_with(ResponseTemplate::new(200))
.mount(&mock_server)
.await;
let resp = Client::new().get(&mock_server.uri()).send().await.unwrap();
assert_eq!(resp.status(), 200);
}
#[tokio::test]
async fn hello_reqwest_http2() {
let mock_server = MockServer::start().await;
Mock::given(method("GET"))
.and(path("/"))
.respond_with(ResponseTemplate::new(200))
.mount(&mock_server)
.await;
let resp = Client::builder()
.http2_prior_knowledge()
.build()
.expect("http client")
.get(&mock_server.uri())
.send()
.await
.expect("response");
assert_eq!(resp.status(), 200);
assert_eq!(resp.version(), reqwest::Version::HTTP_2);
}