| 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 |