From 536772f3c8461e88b39c424fa67bf52fb782ef1e Mon Sep 17 00:00:00 2001 From: Gemma Hou Date: Wed, 18 Sep 2024 00:40:12 +0000 Subject: [PATCH] normalize IPAddress field in golden logs --- .../globalcomputeforwardingrule/_http.log | 8 ++++---- tests/e2e/unified_test.go | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log index 96dc7556e9..d26ba0eda4 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log @@ -747,7 +747,7 @@ User-Agent: kcc/controller-manager x-goog-request-params: project=${projectId} { - "IPAddress": "0.0.0.0", + "IPAddress": "8.8.8.8", "description": "A global forwarding rule", "labels": { "cnrm-test": "true", @@ -840,7 +840,7 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "IPAddress": "0.0.0.0", + "IPAddress": "8.8.8.8", "IPProtocol": "TCP", "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "A global forwarding rule", @@ -919,7 +919,7 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "IPAddress": "0.0.0.0", + "IPAddress": "8.8.8.8", "IPProtocol": "TCP", "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "A global forwarding rule", @@ -1031,7 +1031,7 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "IPAddress": "0.0.0.0", + "IPAddress": "8.8.8.8", "IPProtocol": "TCP", "creationTimestamp": "2024-04-01T12:34:56.123456Z", "description": "A global forwarding rule", diff --git a/tests/e2e/unified_test.go b/tests/e2e/unified_test.go index 90b0dc7475..f478b1446d 100644 --- a/tests/e2e/unified_test.go +++ b/tests/e2e/unified_test.go @@ -527,6 +527,9 @@ func runScenario(ctx context.Context, t *testing.T, testPause bool, fixture reso addReplacement("natIP", "192.0.0.10") addReplacement("labelFingerprint", "abcdef0123A=") addReplacement("fingerprint", "abcdef0123A=") + // Matches the mock ip address of Compute forwarding rule + addReplacement("IPAddress", "8.8.8.8") + // Extract resource targetID numbers from compute operations for _, event := range events { body := event.Response.ParseBody()