From 26d323b26eb8a98de0109d500c04c8ee930ca050 Mon Sep 17 00:00:00 2001 From: Gemma Hou Date: Thu, 3 Oct 2024 01:27:45 +0000 Subject: [PATCH] update affected logs --- mockgcp/mockcompute/regionalforwardingrulev1.go | 2 +- mockgcp/mockcompute/targetgrpcproxyv1.go | 2 +- .../globalcomputeforwardingrule/_http.log | 8 ++++---- .../globalcomputeforwardingrulefull/_http.log | 8 ++++---- .../globalcomputeforwardingrulehttps/_http.log | 12 ++++++------ .../globalcomputeforwardingrulessl/_http.log | 4 ++-- .../globalcomputeforwardingruletcp/_http.log | 4 ++-- .../regionalcomputeforwardingrulefull/_http.log | 8 ++++---- .../regionalforwardingrulepsc/_http.log | 4 ++-- .../v1beta1/computeserviceattachment/_http.log | 4 ++-- ...ated_object_computetargetgrpcproxy.golden.yaml | 1 + .../v1beta1/computetargetgrpcproxy/_http.log | 1 + .../globaltargethttpproxy/_http.log | 12 ++++++------ .../regionaltargethttpproxy/_http.log | 12 ++++++------ .../crossregiontargethttpsproxy/_http.log | 8 ++++---- .../globaltargethttpsproxy-certmap/_http.log | 12 ++++++------ .../globaltargethttpsproxy/_http.log | 12 ++++++------ .../_http.log | 12 ++++++------ .../_http.log | 12 ++++++------ .../regionaltargethttpsproxy/_http.log | 12 ++++++------ .../v1beta1/computetargetsslproxy/_http.log | 4 ++-- .../v1beta1/computetargettcpproxy/_http.log | 4 ++-- .../computeurlmap/regionalcomputeurlmap/_http.log | 8 ++++---- tests/e2e/normalize.go | 15 +++++++++++++++ 24 files changed, 99 insertions(+), 82 deletions(-) diff --git a/mockgcp/mockcompute/regionalforwardingrulev1.go b/mockgcp/mockcompute/regionalforwardingrulev1.go index 75b5f9c758..8a7e7e6fd9 100644 --- a/mockgcp/mockcompute/regionalforwardingrulev1.go +++ b/mockgcp/mockcompute/regionalforwardingrulev1.go @@ -82,7 +82,7 @@ func (s *RegionalForwardingRulesV1) Insert(ctx context.Context, req *pb.InsertFo if obj.NetworkTier == nil { obj.NetworkTier = PtrTo("PREMIUM") } - if *obj.LoadBalancingScheme == "" { + if obj.LoadBalancingScheme != nil && *obj.LoadBalancingScheme == "" { obj.LoadBalancingScheme = nil } diff --git a/mockgcp/mockcompute/targetgrpcproxyv1.go b/mockgcp/mockcompute/targetgrpcproxyv1.go index 81db89bbcb..e822572882 100644 --- a/mockgcp/mockcompute/targetgrpcproxyv1.go +++ b/mockgcp/mockcompute/targetgrpcproxyv1.go @@ -123,7 +123,7 @@ func (n *targetGrpcProxyName) String() string { func (s *MockService) parseTargetGrpcProxyName(name string) (*targetGrpcProxyName, error) { tokens := strings.Split(name, "/") - if len(tokens) == 5 && tokens[0] == "projects" && tokens[3] == "targetGrpcProxies" { + if len(tokens) == 5 && tokens[0] == "projects" && tokens[2] == "global" && tokens[3] == "targetGrpcProxies" { project, err := s.Projects.GetProjectByID(tokens[1]) if err != nil { return nil, err 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 d26ba0eda4..25ae0fa839 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 @@ -344,11 +344,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -456,11 +456,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log index 21de2ed47e..c4f8e388f9 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log @@ -344,11 +344,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -456,11 +456,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log index 0c0cf1d4e6..5b7dff8806 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log @@ -331,11 +331,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -443,11 +443,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -533,11 +533,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log index 3d5d789c21..6cd8cba5c7 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log @@ -331,11 +331,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log index 81d1bc08e5..ebe8796bde 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log @@ -331,11 +331,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrulefull/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrulefull/_http.log index 63367e72c8..731ce4f3d1 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrulefull/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrulefull/_http.log @@ -295,11 +295,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -410,11 +410,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_http.log index d429432947..7dea872135 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_http.log @@ -1159,11 +1159,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeserviceattachment/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeserviceattachment/_http.log index 557d759910..54af6ed8ce 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeserviceattachment/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeserviceattachment/_http.log @@ -521,11 +521,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/example-project-01/regions/us-west1/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/example-project-01/regions/us-west1/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/example-project-01/regions/us-west1/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/example-project-01/regions/us-west1/backendServices/computebackendservice-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_generated_object_computetargetgrpcproxy.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_generated_object_computetargetgrpcproxy.golden.yaml index 3d97a92503..aa04d5b40c 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_generated_object_computetargetgrpcproxy.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_generated_object_computetargetgrpcproxy.golden.yaml @@ -32,3 +32,4 @@ status: fingerprint: abcdef0123A= observedGeneration: 2 selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetGrpcProxies/computetargetgrpcproxy-${uniqueId} + selfLinkWithId: https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetGrpcProxies/${targetGrpcProxiesID} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_http.log index 76542c1faa..0eed165d45 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetgrpcproxy/_http.log @@ -321,6 +321,7 @@ X-Xss-Protection: 0 "kind": "compute#targetGrpcProxy", "name": "computetargetgrpcproxy-${uniqueId}", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetGrpcProxies/computetargetgrpcproxy-${uniqueId}", + "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetGrpcProxies/${targetGrpcProxiesId}", "urlMap": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}", "validateForProxyless": true } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/globaltargethttpproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/globaltargethttpproxy/_http.log index 22c9db2fa4..577f0432ce 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/globaltargethttpproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/globaltargethttpproxy/_http.log @@ -127,11 +127,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -239,11 +239,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -329,11 +329,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/regionaltargethttpproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/regionaltargethttpproxy/_http.log index bda2bc3215..afaebcae23 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/regionaltargethttpproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpproxy/regionaltargethttpproxy/_http.log @@ -129,11 +129,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -246,11 +246,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -338,11 +338,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/crossregiontargethttpsproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/crossregiontargethttpsproxy/_http.log index a604520147..32ee692441 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/crossregiontargethttpsproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/crossregiontargethttpsproxy/_http.log @@ -19,11 +19,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -264,11 +264,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy-certmap/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy-certmap/_http.log index ebb3fd9a52..d5bc95090d 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy-certmap/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy-certmap/_http.log @@ -127,11 +127,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -239,11 +239,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -329,11 +329,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy/_http.log index b3de2aa1c5..aeed37ea50 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxy/_http.log @@ -127,11 +127,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -239,11 +239,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -329,11 +329,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemanagercertificates/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemanagercertificates/_http.log index 635a5750b5..aa65af6340 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemanagercertificates/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemanagercertificates/_http.log @@ -127,11 +127,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -239,11 +239,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -329,11 +329,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemap/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemap/_http.log index 4b8b179704..90cc180f30 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemap/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/globaltargethttpsproxycertificatemap/_http.log @@ -127,11 +127,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -239,11 +239,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -329,11 +329,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/regionaltargethttpsproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/regionaltargethttpsproxy/_http.log index 0022803887..e8b37c3e61 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/regionaltargethttpsproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargethttpsproxy/regionaltargethttpsproxy/_http.log @@ -129,11 +129,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -246,11 +246,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}' was not found" } } @@ -338,11 +338,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-2-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetsslproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetsslproxy/_http.log index 7fbdee0cc6..889a38d196 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetsslproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargetsslproxy/_http.log @@ -127,11 +127,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/_http.log index f1d2876156..df689facc7 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computetargettcpproxy/_http.log @@ -125,11 +125,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}' was not found" } } diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeurlmap/regionalcomputeurlmap/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeurlmap/regionalcomputeurlmap/_http.log index 409ef0edbb..3d0bfd6378 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeurlmap/regionalcomputeurlmap/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeurlmap/regionalcomputeurlmap/_http.log @@ -129,11 +129,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "backendService \"projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/backendServices/computebackendservice-${uniqueId}' was not found" } } @@ -247,11 +247,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "urlMap \"projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/urlMaps/computeurlmap-${uniqueId}' was not found" } } diff --git a/tests/e2e/normalize.go b/tests/e2e/normalize.go index 4c0139b009..dcb37b0e23 100644 --- a/tests/e2e/normalize.go +++ b/tests/e2e/normalize.go @@ -260,6 +260,21 @@ func normalizeKRMObject(t *testing.T, u *unstructured.Unstructured, project test } } + id, _, _ := unstructured.NestedString(u.Object, "status", "selfLinkWithId") + if id != "" { + tokens := strings.Split(id, "/") + n := len(tokens) + if n >= 2 { + typeName := tokens[len(tokens)-2] + id := tokens[len(tokens)-1] + if typeName == "targetGrpcProxies" { + visitor.stringTransforms = append(visitor.stringTransforms, func(path string, s string) string { + return strings.ReplaceAll(s, id, "${targetGrpcProxiesID}") + }) + } + } + } + resourceID, _, _ := unstructured.NestedString(u.Object, "spec", "resourceID") if resourceID != "" { switch u.GroupVersionKind() {