MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / grpc_path_includes_request_id

Function grpc_path_includes_request_id

crates/openshell-server/src/multiplex.rs:940–957  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

938
939 #[tokio::test]
940 async fn grpc_path_includes_request_id() {
941 let addr = start_http_server_with_middleware().await;
942 let resp = http1_get(
943 addr,
944 "/openshell.v1.OpenShell/Health",
945 &[
946 ("content-type", "application/grpc"),
947 ("x-request-id", "grpc-corr-id"),
948 ],
949 )
950 .await;
951
952 let request_id = resp
953 .headers()
954 .get("x-request-id")
955 .expect("gRPC-routed response should include x-request-id header");
956 assert_eq!(request_id.to_str().unwrap(), "grpc-corr-id");
957 }
958
959 #[derive(Clone)]
960 struct CountingGrpcService {

Callers

nothing calls this directly

Calls 3

http1_getFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected