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

Function p2_cli_serve_config

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

Source from the content-addressed store, hash-verified

2116
2117 #[tokio::test]
2118 async fn p2_cli_serve_config() -> Result<()> {
2119 let server = WasmtimeServe::new(P2_CLI_SERVE_CONFIG_COMPONENT, |cmd| {
2120 cmd.arg("-Scli");
2121 cmd.arg("-Sconfig");
2122 cmd.arg("-Sconfig-var=hello=world");
2123 })?;
2124
2125 let resp = server
2126 .send_request(
2127 hyper::Request::builder()
2128 .uri("http://localhost/")
2129 .body(String::new())
2130 .context("failed to make request")?,
2131 )
2132 .await?;
2133
2134 assert!(resp.status().is_success());
2135 assert_eq!(resp.body(), "world");
2136 Ok(())
2137 }
2138
2139 #[test]
2140 fn p2_cli_config() -> Result<()> {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected