Skip to content

Commit

Permalink
Fix test for new Envoy error message behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed Nov 5, 2024
1 parent 1a17c85 commit ddaf7ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/proxy/logging/test_basics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,13 @@ def test_logs_requests_when_backend_is_down
]) do
response = Typhoeus.get("http://127.0.0.1:9080/#{unique_test_id}/down", log_http_options)
assert_response_code(503, response)
assert_match("upstream connect error or disconnect/reset before headers. retried and the latest reset reason: remote connection failure, transport failure reason: delayed connect error: 111", response.body)
assert_match("upstream connect error or disconnect/reset before headers. retried and the latest reset reason: remote connection failure, transport failure reason: delayed connect error: Connection refused", response.body)

record = wait_for_log(response)[:hit_source]
assert_equal(503, record["response_status"])
assert_logs_base_fields(record, api_user)
assert_equal("127.0.0.1:9450", record["api_backend_resolved_host"])
assert_equal("upstream_reset_before_response_started{remote_connection_failure,delayed_connect_error:_111}", record["api_backend_response_code_details"])
assert_nil(record["api_backend_resolved_host"])
assert_equal("upstream_reset_before_response_started{remote_connection_failure|delayed_connect_error:_Connection_r", record["api_backend_response_code_details"])
assert_equal("URX,UF", record["api_backend_response_flags"])
assert_equal("cMsSf ", record["response_cache_flags"])
end
Expand Down

0 comments on commit ddaf7ca

Please sign in to comment.