Skip to content

Commit

Permalink
test: use maxmind db test ip to reduce flaky test (#13083)
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall authored May 6, 2024
1 parent 2b3790f commit 17ace23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
17 changes: 4 additions & 13 deletions systemtest/approvals/TestOTLPGRPCLogsClientIP.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,20 @@
"agent.version": [
"unknown"
],
"client.geo.city_name": [
"dynamic"
],
"client.geo.continent_name": [
"Europe"
],
"client.geo.country_iso_code": [
"DE"
"SE"
],
"client.geo.country_name": [
"Germany"
"Sweden"
],
"client.geo.location": [
"dynamic"
],
"client.geo.region_iso_code": [
"dynamic"
],
"client.geo.region_name": [
"dynamic"
],
"client.ip": [
"178.162.206.244"
"89.160.20.128"
],
"data_stream.dataset": [
"apm.app.unknown"
Expand Down Expand Up @@ -73,7 +64,7 @@
"unknown"
],
"source.ip": [
"178.162.206.244"
"89.160.20.128"
],
"source.nat.ip": [
"127.0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion systemtest/otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ func TestOTLPGRPCLogsClientIP(t *testing.T) {
defer cancel()

// Override local IP address to be found in "GeoLite2-City.mmdb".
md := metadata.New(map[string]string{"X-Forwarded-For": "178.162.206.244"})
md := metadata.New(map[string]string{"X-Forwarded-For": "89.160.20.128"})
ctx = metadata.NewOutgoingContext(ctx, md)

conn, err := grpc.Dial(serverAddr(srv), grpc.WithInsecure(), grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.UseCompressor("gzip")))
Expand Down

0 comments on commit 17ace23

Please sign in to comment.