From 41cc0ec379c7218522168e703b225ee31ff88203 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Mon, 3 Mar 2025 15:58:48 -0800 Subject: [PATCH] fix rust tests --- crates/prompt_gateway/tests/integration.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/crates/prompt_gateway/tests/integration.rs b/crates/prompt_gateway/tests/integration.rs index 0792a319..6fbed26a 100644 --- a/crates/prompt_gateway/tests/integration.rs +++ b/crates/prompt_gateway/tests/integration.rs @@ -363,7 +363,11 @@ fn prompt_gateway_request_to_llm_gateway() { }, }], model: String::from("test"), - metadata: None, + metadata: { + let mut map: HashMap = HashMap::new(); + map.insert("function_latency".to_string(), "0.0".to_string()); + Some(map) + }, }; let expected_body = "{\"city\":\"seattle\"}"; @@ -378,17 +382,17 @@ fn prompt_gateway_request_to_llm_gateway() { .expect_log(Some(LogLevel::Trace), None) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Trace), None) - .expect_log(Some(LogLevel::Trace), None) + .expect_log(Some(LogLevel::Debug), None) .expect_http_call( Some("arch_internal"), Some(vec![ - (":method", "POST"), - ("content-type", "application/json"), - ("x-arch-upstream", "api_server"), - (":authority", "api_server"), ("x-envoy-max-retries", "3"), - (":path", "/weather"), + ("x-arch-upstream", "api_server"), + ("content-type", "application/json"), ("x-envoy-upstream-rq-timeout-ms", "30000"), + (":path", "/weather"), + (":method", "POST"), + (":authority", "api_server"), ]), Some(expected_body), None,