Skip to content

Commit

Permalink
Adjustments for new geoip results.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed Sep 5, 2023
1 parent b28757d commit 6473a7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/proxy/logging/test_ip_geocoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ def test_ipv4_mapped_ipv6_address
def test_country_city_no_region
response = Typhoeus.get("http://127.0.0.1:9080/api/hello", log_http_options.deep_merge({
:headers => {
"X-Forwarded-For" => "102.38.240.0",
"X-Forwarded-For" => "62.68.85.0",
},
}))
assert_response_code(200, response)

record = wait_for_log(response)[:hit_source]
assert_geocode(record, {
:ip => "102.38.240.0",
:ip => "62.68.85.0",
:country => "MC",
:region => nil,
:city => "Monte Carlo",
Expand Down Expand Up @@ -140,19 +140,19 @@ def test_no_country_region_city
def test_city_accent_chars
response = Typhoeus.get("http://127.0.0.1:9080/api/hello", log_http_options.deep_merge({
:headers => {
"X-Forwarded-For" => "24.37.130.0",
"X-Forwarded-For" => "24.37.115.0",
},
}))
assert_response_code(200, response)

record = wait_for_log(response)[:hit_source]
assert_geocode(record, {
:ip => "24.37.130.0",
:ip => "24.37.115.0",
:country => "CA",
:region => "QC",
:city => "Trois-Rivières",
:lat => 46.4176,
:lon => -72.6372,
:lon => -72.4927,
})
end

Expand Down

0 comments on commit 6473a7a

Please sign in to comment.