MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / p2_cli_serve_outgoing_body_config

Function p2_cli_serve_outgoing_body_config

tests/all/cli_tests.rs:1829–1850  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1827
1828 #[tokio::test]
1829 async fn p2_cli_serve_outgoing_body_config() -> Result<()> {
1830 let server = WasmtimeServe::new(P2_CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {
1831 cmd.arg("-Scli");
1832 cmd.arg("-Shttp-outgoing-body-buffer-chunks=2");
1833 cmd.arg("-Shttp-outgoing-body-chunk-size=1024");
1834 })?;
1835
1836 let resp = server
1837 .send_request(
1838 hyper::Request::builder()
1839 .uri("http://localhost/")
1840 .header("env", "FOO")
1841 .body(String::new())
1842 .context("failed to make request")?,
1843 )
1844 .await?;
1845
1846 assert!(resp.status().is_success());
1847
1848 server.finish()?;
1849 Ok(())
1850 }
1851
1852 #[tokio::test]
1853 #[ignore] // TODO: printing stderr in the child and killing the child at the

Callers

nothing calls this directly

Calls 9

OkFunction · 0.85
bodyMethod · 0.80
newFunction · 0.50
builderFunction · 0.50
argMethod · 0.45
send_requestMethod · 0.45
contextMethod · 0.45
headerMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected