From d655b1acbd66dd142a05f9bb955039f494e938b7 Mon Sep 17 00:00:00 2001 From: Eric Zhao Date: Wed, 6 Sep 2023 14:06:11 +1000 Subject: [PATCH] fix: update verified test --- .../simple_regional_with_networking_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/simple_regional_with_networking/simple_regional_with_networking_test.go b/test/integration/simple_regional_with_networking/simple_regional_with_networking_test.go index 8fda948f3d..fede13ab5d 100644 --- a/test/integration/simple_regional_with_networking/simple_regional_with_networking_test.go +++ b/test/integration/simple_regional_with_networking/simple_regional_with_networking_test.go @@ -14,6 +14,7 @@ package simple_regional_with_networking import ( + "strings" "testing" "github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/gcloud" @@ -32,7 +33,7 @@ func TestSimpleRegionalWithNetworking(t *testing.T) { projectId := bpt.GetStringOutput("project_id") location := bpt.GetStringOutput("location") clusterName := bpt.GetStringOutput("cluster_name") - serviceAccount := bpt.GetStringOutput("service_account") + serviceAccount := strings.ReplaceAll(bpt.GetStringOutput("service_account"), projectId, "PROJECT_ID") region := bpt.GetStringOutput("region") subnetName := bpt.GetStringOutput("subnet_name") ipRangeServicesName := bpt.GetStringOutput("ip_range_services_name") @@ -40,8 +41,8 @@ func TestSimpleRegionalWithNetworking(t *testing.T) { op := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId) g := golden.NewOrUpdate(t, op.String(), - golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")), golden.WithSanitizer(golden.StringSanitizer(projectId, "PROJECT_ID")), + golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")), golden.WithSanitizer(golden.StringSanitizer(clusterName, "CLUSTER_NAME")), ) validateJSONPaths := []string{