Audit public API and SemVer surface (#103)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 13m8s
Native code generation / deterministic (push) Failing after 2m8s
Concurrency and resource soak audit / soak (push) Failing after 6m39s
Imaging and meshing gate / native (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Native Rust workspace compile / compile (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
JPEG 2000 feature / linux (push) Successful in 2m46s
Skia feature / linux (push) Successful in 31m0s

This commit is contained in:
2026-08-12 01:35:26 +00:00
parent 5eb3f01122
commit d08b59c9a9
35 changed files with 5112 additions and 67 deletions

View File

@@ -797,8 +797,32 @@ async fn read_http_request(stream: &mut tokio::net::TcpStream) -> Vec<u8> {
}
}
#[test]
fn native_transport_rejects_invalid_resource_policy_before_building() {
assert!(matches!(
HttpCapsClient::with_native_transport(
"MetaCrate-caps-test/0.0.1",
Duration::ZERO,
1,
None,
CapsHttpLimits::default(),
),
Err(Error::Argument)
));
assert!(matches!(
HttpCapsClient::with_native_transport(
"MetaCrate-caps-test/0.0.1",
Duration::from_secs(1),
0,
None,
CapsHttpLimits::default(),
),
Err(Error::Argument)
));
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn injected_reqwest_backend_follows_redirects_streams_and_decompresses() {
async fn native_http_backend_follows_redirects_streams_and_decompresses() {
let listener = tokio::net::TcpListener::bind((std::net::Ipv4Addr::LOCALHOST, 0))
.await
.expect("bind fake server");
@@ -842,12 +866,10 @@ async fn injected_reqwest_backend_follows_redirects_streams_and_decompresses() {
}
});
let reqwest = reqwest::Client::builder()
.redirect(reqwest::redirect::Policy::limited(3))
.build()
.expect("reqwest client");
let client = HttpCapsClient::with_reqwest_client(
reqwest,
let client = HttpCapsClient::with_native_transport(
"MetaCrate-caps-test/0.0.1",
Duration::from_secs(5),
4,
None,
CapsHttpLimits {
max_request_bytes: 1_024,