Skip to content

Commit

Permalink
fix tests due to new logs being added
Browse files Browse the repository at this point in the history
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
  • Loading branch information
eguzki committed Sep 10, 2024
1 parent b7e37c8 commit 839cc99
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/rate_limited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ fn it_limits() {
Some(LogLevel::Debug),
Some("#2 ratelimitpolicy selected some-name"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 pattern_expression_applies: selector: request.url_path path: [\"request\", \"url_path\"]"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 pattern_expression_applies: selector: request.host path: [\"request\", \"host\"]"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 pattern_expression_applies: selector: request.method path: [\"request\", \"method\"]"),
)
.expect_grpc_call(
Some("limitador-cluster"),
Some("envoy.service.ratelimit.v3.RateLimitService"),
Expand Down Expand Up @@ -317,6 +329,18 @@ fn it_passes_additional_headers() {
Some(LogLevel::Debug),
Some("#2 ratelimitpolicy selected some-name"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 pattern_expression_applies: selector: request.url_path path: [\"request\", \"url_path\"]"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 pattern_expression_applies: selector: request.host path: [\"request\", \"host\"]"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 pattern_expression_applies: selector: request.method path: [\"request\", \"method\"]"),
)
.expect_grpc_call(
Some("limitador-cluster"),
Some("envoy.service.ratelimit.v3.RateLimitService"),
Expand Down Expand Up @@ -556,6 +580,10 @@ fn it_does_not_rate_limits_when_selector_does_not_exist_and_misses_default_value
Some(LogLevel::Debug),
Some("#2 ratelimitpolicy selected some-name"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 data selector: selector: unknown.path path: Path { tokens: [\"unknown\", \"path\"] }"),
)
.expect_log(
Some(LogLevel::Debug),
Some("#2 build_single_descriptor: selector not found: unknown.path"),
Expand Down

0 comments on commit 839cc99

Please sign in to comment.