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

Function p2_cli_serve_keyvalue

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

Source from the content-addressed store, hash-verified

2149
2150 #[tokio::test]
2151 async fn p2_cli_serve_keyvalue() -> Result<()> {
2152 let server = WasmtimeServe::new(P2_CLI_SERVE_KEYVALUE_COMPONENT, |cmd| {
2153 cmd.arg("-Scli");
2154 cmd.arg("-Skeyvalue");
2155 cmd.arg("-Skeyvalue-in-memory-data=hello=world");
2156 })?;
2157
2158 let resp = server
2159 .send_request(
2160 hyper::Request::builder()
2161 .uri("http://localhost/")
2162 .body(String::new())
2163 .context("failed to make request")?,
2164 )
2165 .await?;
2166
2167 assert!(resp.status().is_success());
2168 assert_eq!(resp.body(), "world");
2169 Ok(())
2170 }
2171
2172 #[test]
2173 fn p2_cli_keyvalue() -> 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