From 806d0339db4bf54e9475b2142c32a4d9d03d7078 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:51:47 +0000 Subject: [PATCH] Mark most client.geo.* as dynamic in TestRUMXForwardedFor approvals (backport #14997) (#15017) * Mark most client.geo.* as dynamic in TestRUMXForwardedFor approvals (#14997) Mark client.geo.{city_name,location,region_iso_code,region_name} as dynamic in TestRUMXforwardedFor. This will make it consistent with other systemtest approvals. (cherry picked from commit 4305ce3061d3235302a904fd679f0b31ac4b363a) # Conflicts: # systemtest/approvals/TestRUMXForwardedFor.approved.json * Delete systemtest/approvals/TestRUMXForwardedFor.approved.json * Update data_streams_enabled.approved.json * Update data_streams_disabled.approved.json --------- Co-authored-by: Carson Ip Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com> --- .../data_streams_disabled.approved.json | 12 ++++++------ .../data_streams_enabled.approved.json | 12 ++++++------ systemtest/rum_test.go | 3 +++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/systemtest/approvals/TestRUMXForwardedFor/data_streams_disabled.approved.json b/systemtest/approvals/TestRUMXForwardedFor/data_streams_disabled.approved.json index 6ebe7faae13..5e02805e4f0 100644 --- a/systemtest/approvals/TestRUMXForwardedFor/data_streams_disabled.approved.json +++ b/systemtest/approvals/TestRUMXForwardedFor/data_streams_disabled.approved.json @@ -8,13 +8,13 @@ }, "client": { "geo": { - "city_name": "Perth", + "city_name": "dynamic", "continent_name": "Oceania", "country_iso_code": "AU", "country_name": "Australia", "location": "dynamic", - "region_iso_code": "AU-WA", - "region_name": "Western Australia" + "region_iso_code": "dynamic", + "region_name": "dynamic" }, "ip": "220.244.41.16" }, @@ -73,13 +73,13 @@ }, "client": { "geo": { - "city_name": "Perth", + "city_name": "dynamic", "continent_name": "Oceania", "country_iso_code": "AU", "country_name": "Australia", "location": "dynamic", - "region_iso_code": "AU-WA", - "region_name": "Western Australia" + "region_iso_code": "dynamic", + "region_name": "dynamic" }, "ip": "220.244.41.16" }, diff --git a/systemtest/approvals/TestRUMXForwardedFor/data_streams_enabled.approved.json b/systemtest/approvals/TestRUMXForwardedFor/data_streams_enabled.approved.json index ef304180110..322ccdedf55 100644 --- a/systemtest/approvals/TestRUMXForwardedFor/data_streams_enabled.approved.json +++ b/systemtest/approvals/TestRUMXForwardedFor/data_streams_enabled.approved.json @@ -8,13 +8,13 @@ }, "client": { "geo": { - "city_name": "Perth", + "city_name": "dynamic", "continent_name": "Oceania", "country_iso_code": "AU", "country_name": "Australia", "location": "dynamic", - "region_iso_code": "AU-WA", - "region_name": "Western Australia" + "region_iso_code": "dynamic", + "region_name": "dynamic" }, "ip": "220.244.41.16" }, @@ -77,13 +77,13 @@ }, "client": { "geo": { - "city_name": "Perth", + "city_name": "dynamic", "continent_name": "Oceania", "country_iso_code": "AU", "country_name": "Australia", "location": "dynamic", - "region_iso_code": "AU-WA", - "region_name": "Western Australia" + "region_iso_code": "dynamic", + "region_name": "dynamic" }, "ip": "220.244.41.16" }, diff --git a/systemtest/rum_test.go b/systemtest/rum_test.go index e6fad1d4215..57732763c5d 100644 --- a/systemtest/rum_test.go +++ b/systemtest/rum_test.go @@ -76,7 +76,10 @@ func testRUMXForwardedFor(t *testing.T, srv *apmservertest.Server) { "source.port", // Do not assert the exact contents of the location field since they may change // slightly depending on the IP lookup. + "client.geo.city_name", "client.geo.location", + "client.geo.region_iso_code", + "client.geo.region_name", ) }