diff --git a/tests/rate_limited.rs b/tests/rate_limited.rs index 7376598b..53c7675e 100644 --- a/tests/rate_limited.rs +++ b/tests/rate_limited.rs @@ -57,6 +57,12 @@ fn it_loads() { module .call_proxy_on_request_headers(http_context, 0, false) .expect_log(Some(LogLevel::Info), Some("on_http_request_headers #2")) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("traceparent")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("tracestate")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("baggage")) + .returning(None) .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some(":authority")) .returning(Some("cars.toystore.com")) .expect_log( @@ -155,6 +161,12 @@ fn it_limits() { module .call_proxy_on_request_headers(http_context, 0, false) .expect_log(Some(LogLevel::Info), Some("on_http_request_headers #2")) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("traceparent")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("tracestate")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("baggage")) + .returning(None) .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some(":authority")) .returning(Some("cars.toystore.com")) .expect_get_property(Some(vec!["request", "url_path"])) @@ -283,6 +295,12 @@ fn it_passes_additional_headers() { module .call_proxy_on_request_headers(http_context, 0, false) .expect_log(Some(LogLevel::Info), Some("on_http_request_headers #2")) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("traceparent")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("tracestate")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("baggage")) + .returning(None) .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some(":authority")) .returning(Some("cars.toystore.com")) .expect_get_property(Some(vec!["request", "url_path"])) @@ -405,6 +423,12 @@ fn it_rate_limits_with_empty_conditions() { module .call_proxy_on_request_headers(http_context, 0, false) .expect_log(Some(LogLevel::Info), Some("on_http_request_headers #2")) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("traceparent")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("tracestate")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("baggage")) + .returning(None) .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some(":authority")) .returning(Some("a.com")) .expect_grpc_call( @@ -506,6 +530,12 @@ fn it_does_not_rate_limits_when_selector_does_not_exist_and_misses_default_value module .call_proxy_on_request_headers(http_context, 0, false) .expect_log(Some(LogLevel::Info), Some("on_http_request_headers #2")) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("traceparent")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("tracestate")) + .returning(None) + .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some("baggage")) + .returning(None) .expect_get_header_map_value(Some(MapType::HttpRequestHeaders), Some(":authority")) .returning(Some("a.com")) .expect_get_property(Some(vec!["unknown", "path"]))