Skip to content

Commit

Permalink
normalize IPAddress field in golden logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Sep 18, 2024
1 parent 9e831e6 commit 536772f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/unified_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 536772f

Please sign in to comment.