()
| 916 | |
| 917 | #[tokio::test] |
| 918 | async fn each_request_gets_unique_id() { |
| 919 | let addr = start_http_server_with_middleware().await; |
| 920 | |
| 921 | let mut ids = Vec::new(); |
| 922 | for _ in 0..3 { |
| 923 | let resp = http1_get(addr, "/healthz", &[]).await; |
| 924 | let id = resp |
| 925 | .headers() |
| 926 | .get("x-request-id") |
| 927 | .unwrap() |
| 928 | .to_str() |
| 929 | .unwrap() |
| 930 | .to_string(); |
| 931 | ids.push(id); |
| 932 | } |
| 933 | |
| 934 | assert_ne!(ids[0], ids[1]); |
| 935 | assert_ne!(ids[1], ids[2]); |
| 936 | assert_ne!(ids[0], ids[2]); |
| 937 | } |
| 938 | |
| 939 | #[tokio::test] |
| 940 | async fn grpc_path_includes_request_id() { |
nothing calls this directly
no test coverage detected