Skip to content

Commit 6d25190

Browse files
Fix multiple VCR tests (#6500) (#4659)
* fixed multiple currently failed VCR tests Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]>
1 parent 0a83621 commit 6d25190

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

.changelog/6500.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_cgc_snippet_generated_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ resource "google_project_service" "workflows" {
522522
# Create a service account for Eventarc trigger and Workflows
523523
resource "google_service_account" "eventarc_workflows_service_account" {
524524
provider = google-beta
525-
account_id = "eventarc-workflows-sa"
525+
account_id = "tf-test-eventarc-sa%{random_suffix}"
526526
display_name = "Eventarc Workflows Service Account"
527527
}
528528

google-beta/resource_cloud_run_service.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func cloudrunAnnotationDiffSuppress(k, old, new string, d *schema.ResourceData)
5454
}
5555

5656
var cloudRunGoogleProvidedTemplateAnnotations = regexp.MustCompile(`template\.0\.metadata\.0\.annotations\.run\.googleapis\.com/sandbox`)
57+
var cloudRunGoogleProvidedTemplateAnnotations_autoscaling_maxscale = regexp.MustCompile(`template\.0\.metadata\.0\.annotations\.autoscaling\.knative\.dev/maxScale`)
5758

5859
func cloudrunTemplateAnnotationDiffSuppress(k, old, new string, d *schema.ResourceData) bool {
5960
// Suppress diffs for the annotations provided by API
@@ -62,6 +63,10 @@ func cloudrunTemplateAnnotationDiffSuppress(k, old, new string, d *schema.Resour
6263
return true
6364
}
6465

66+
if cloudRunGoogleProvidedTemplateAnnotations_autoscaling_maxscale.MatchString(k) && new == "" {
67+
return true
68+
}
69+
6570
// For other keys, don't suppress diff.
6671
return false
6772
}

google-beta/resource_cloud_run_service_generated_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,16 @@ resource "google_cloud_run_service" "default" {
493493
image = "us-docker.pkg.dev/cloudrun/container/hello"
494494
}
495495
}
496+
metadata {
497+
annotations = {
498+
"run.googleapis.com/vpc-access-connector" = google_vpc_access_connector.default.name
499+
"run.googleapis.com/vpc-access-egress" = "all-traffic"
500+
}
501+
}
496502
}
497503
498504
metadata {
499505
annotations = {
500-
"run.googleapis.com/vpc-access-connector" = google_vpc_access_connector.default.name
501-
"run.googleapis.com/vpc-access-egress" = "all-traffic"
502506
"run.googleapis.com/ingress" = "all"
503507
}
504508
}

google-beta/resource_sql_database_instance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ func TestAccSqlDatabaseInstance_SqlServerAuditConfig(t *testing.T) {
11641164
databaseName := "tf-test-" + randString(t, 10)
11651165
rootPassword := randString(t, 15)
11661166
addressName := "tf-test-" + randString(t, 10)
1167-
networkName := BootstrapSharedTestNetwork(t, "sql-instance-private-allocated-ip-range")
1167+
networkName := BootstrapSharedTestNetwork(t, "sql-instance-sqlserver-audit")
11681168
bucketName := fmt.Sprintf("%s-%d", "tf-test-bucket", randInt(t))
11691169
uploadInterval := "900s"
11701170
retentionInterval := "86400s"

0 commit comments

Comments
 (0)